Convert Oracle relation string to POSTGIS dimensional matrix - computational-geometry

I want to convert a query from Oracle spatial to postgis. It uses relation strings for it's sdo_relate function for which I want to get the dimensional matrix in st_relate. I tried using st_intersects, but I get overlapping areas in geometries. Can I please get some help in understanding the conversion? Thanks.
I want the postgis dimensional matrix for the following two oracle relation strings-
st_relate(geomA, geomB, 'MASK=ANYINTERACT')
st_relate(geomA, geomB, 'mask=TOUCH+INSIDE')

ST_Intersects(A,B) and ST_Contains(A,B), respectively.

Related

Does cube of ODI support OLAP operations like dicing, drilling, pivoting

I am a newbie in ODI. I have installed ODI 12c and created a data cube in it. After mapping the data cube, it is just added into the Oracle database like a simple table. I am wondering how the cube helps us to run queries very fast and in low time.
I have searched a lot and found that OLAP cube's Operations are Dicing, Drilling, Pivoting, ...
Would you please guide me on how to drill, dice, and pivot on the cube which is created in ODI?
Any help is really appreciated.
ODI it's a tool that integrates data. The operation of Dicing, Drilling, Pivoting and so on, are operations that are made on a reporting tool such as Oracle OLAP.
You can't do that in ODI.
You could see in this page all the details rearding ODI Cubes.
EDIT 1, based on comment:
Due to the fact that when you create a Cube, you need to specify a datastore and dimensions(and also when create a dimension you need to specify a datastore) it means that a Cube have a phisical table behind.
Please read here about dimensions and then about Cubes.
Very sort extraction from the links:
A cube is a set of measures grouped together that have similar dimensionality. The axes of the cube contain dimension values and the body of the cube contains measure values.
A dimension is a structure that organizes data. For example, a products dimension organizes data about products including product information, product categories and its sub-categories. A dimension consists of a set of levels and a set of hierarchies defined over these levels.
Hope that this answer helps you,
Florin!

Is there support for geodesic DWithin query in geomesa?

I am struggling with DWithin queries in geomesa.
I have ingested many geo points from OSM and want to make DWithin queries.
I have the following code for query:
val query = new Query("t1", ECQL.toFilter("DWITHIN(geo_point, POINT (14.453943 60.499611), 5000, meters)"))
I expect geomesa to answer with the points not far then 5000 meters from POINT (14.453943 60.499611) (points 2,3,4 on the map).
But geomesa gives me more points than expected.
All the points in the map (1,2,3,4,5,6) are returned for this query.
It seems that geomesa can't properly filter out the points for DWithin query since it does not have support for geodesic distance checks.
So, is there any way to make DWITHIN query work correctly (in a geodesic manner) with geomesa?
Thanks!
GeoMesa uses the geotools dwithin filter function for such queries. Unfortunately, the function only supports native distances (i.e. degrees in WGS84).
Currently, your best bet is to use the geotools GeodeticCalculator class to create a polygon covering your query area and use that in an intersects filter. Alternatively, you could post-filter the results using the Geodetic Calculator.
Going forward, I've created a ticket to handle this use case better in GeoMesa: https://geomesa.atlassian.net/browse/GEOMESA-2263

Using sdo_contains with transient object in Oracle

I have two varchar columns with wkt value (a polygon and a point). I want to know if there are a polygon that contains some point using Oracle.
I'm using sdo_contains command, but don't work. According the documentation, the polygon should be indexed. Can anyone help me how to get around this problem?
I don't want to create a geometry column. I can't change the table structure or add a column.
SDO_CONTAINS is a spatial operator function and does indeed require an index (or rather, an indexed geometry column).
For arbitrary in-memory geometry objects, you can use SDO_GEOM.RELATE with the CONTAINS or INSIDE mask.
https://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objgeom.htm#BGHCDIDG

Unable to use multiplication with grayscale image matrix

I am quite new to matlab/octave. I loaded an image using imread() function of octave. I tried to perform multiplication operation on the matrix but get the following error:
binary operator `*' not implemented for `uint8 matrix' by `matrix' operations
Is there another way to input the image??
I=imread('...');
I=rgb2gray(I);
I=double(I);
% you can perform the multiplication operation now
This usually means that you are trying to multiply arrays of different data types. The easiest thing to do here is to convert the uint8 image into double. You can either use the double() function, which will just cast the values, or us im2double(), which will also normalize the values to be between 0 and 1.
If you're trying to multiple two images (I'm guessing that's what you're trying to do since the error is for multiplying matrices and not a matrix by a scalar), you should use the immultiply function which handles different classes for you.
Simply, use immultiply (imgA, imgB) and never again worry about what class are imgA and imgB. Note that you'll need the image package installed in loaded.

Matrix calculations in rails app

In my rails app I need to do the following:
Create a form for inputting the data for a 4x4 matrix, store this data in a model
Use a ruby matrix for calculating the cholesky decomposition of this matrix, and then displaying the resulting decomposed matrix in a view
From what I understand the form data is stored in a 1-dimensional array, I need the data stored in a 4x4 array but I haven't seen any examples of this. What is the best way to do this?
You may want to look at the following tools:
standard Matrix class
ruby gsl gem
extendmatrix gem

Resources