I'm developing rest api (with postgresql data base and postgis) method to get point in requested srid.
There's a method in Postgis which is transforming geometry from current srid to another.
geometry ST_Transform(geometry g1, integer srid);
https://postgis.net/docs/ST_Transform.html
So I want to know which SRIDs are supported by the method? The official documentation doesn't provide answer.
Related
Is it possible to transform geometry data from a custom CRS, i.e. not listed in EXA_SPATIAL_REF_SYS table, e.g. via ST_TRANSFORM(g,srid) or set the CRS of a geometry to a custom CRS e.g. via ST_SETSRID(g,srid)?
In postgis it is for example possible to provide a PROJ.4 text instead of an srid integer.
I would like to avoid to write a UDF that does that and employs some external not included r or python library to handle the transformation as we do not have admin privileges and the request to get external libraries installed takes a lot of time in a bigger organisation.
To create a polygon around a pair of lat+lon coordinates I'd expect to be able to buffer the geogpoint:
e.g. ST_BUFFER(ST_GEOGPOINT(lat, lon), 1000)
This creates a circular polygon with a radius of 1000m.
Bigquery doesn't seem to have the buffer function, which seems like a really basic one - am I missing something? Thanks!
As for now, ST_BUFFER function is not supported in query engine yet. All available geography functions in Standard SQL you can see here. Additionally, you can think about using buffer function from the open source library Turf.JS to make buffers and use it in BigQuery:
jslibs.turf.ST_BUFFER(geometry_to_buffer GEOGRAPHY, radius NUMERIC, units STRING, steps NUMERIC)
Please follow carto tutorial to learn more about using this function.
ST_Buffer is now available (in preview)
https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions#st_buffer
There is also ST_BufferWithTolerance which allows one to specify approximation tolerance, rather than number of segments in polygon approximating the buffer.
I need to calculate distance of two positions on OrientDB with new Spatial Module which is available for version 2.2. I have checked documentation (http://orientdb.com/docs/2.2/Spatial-Module.html) but couldn't find anything. I can calculate distance on my own but that time, what is the point to use the Spatial Module if I will not use spatial capabilities?
Also I need to check that if two positions are less than a threshold value. Again I don't have any documentation given by OrientDB.
Here are the two Java method signatures that I'm trying to implement.
double distance(Vertex gateway, Vertex sink);
boolean isInDistance(Vertex from, Vertex to, double distanceX, double distanceY);
Actually out of already implemented SQL-MM functions, ST_DISTANCE is needed to be implemented. I need a solution as a ST_DISTANCE replacement, I guess.
Thank you for your help.
How can I read the .las header file to determine what spatial reference system (i.e projection system, datum, etc) that a LiDAR point cloud is using?
The best answer can be found in the ASPRS specifications for what should be included in an LAS header. Look for the LASF_Projection portion of the file.
The projection information for the point data is required for all
data. The projection information will be placed in the Variable Length
Records. Placing the projection information within the Variable Length
Records allows for any projection to be defined including custom
projections. The GeoTIFF specification is the model for
representing the projection information, and the format is explicitly
defined by this specification.
GeoKeyDirectoryTag Record: (mandatory)
User ID: LASF_Projection
Record ID: 34735
This record contains the key values that define the coordinate system.
The answer for Erica is correct but partially (is based on the 1.2 las version), as in the new version of the .las format (1.4) there are quite important changes on the OORDINATE REFERENCE SYSTEM (CRS) REPRESENTATION:
Take a look at this:
http://www.asprs.org/a/society/committees/standards/LAS_1_4_r13.pdf
I have a database, which uses the GGRS87 reference system, and contains x-y coordinates of objects. I need to convert them to lat/lon, so that I can store them in SQL Server 2012 using Geography data type.
Or is there a way I can use those x-y coordinates directly to create a geography data? Please let me know.
You can use the xy value directly to create the geometry objects, as long as you know the SRID code for the GGRS87 co-ordinate system (I think it's 4121).
Then use the STGeomFromText method to create your features. E.g.
INSERT INTO SpatialTable (GeogCol1)
VALUES (geography::STGeomFromText('POINT(122 47)', 4121));