-1
votes
2answers
110 views

Convert geometry to latitude-longitude using PostGIS ST_Transform

My table has a geometric field, in EPSG:3857, of type point. I need the latitude and longitude, in EPSG: 4326, of each point. Could someone give me a valid example of how to use ST_Transform().
2
votes
2answers
100 views

Switch coordinates in linestring

I made a silly mistake: when creating linestrings in my PostGis database i inverted the lon and lat values. Which isn't a problem for postgis itself, but for my visualization and intersections. ;) Of ...
2
votes
1answer
102 views

Is it possible to update only latitude or longitude in postgis ?

I have a postgis database that contains Points created based on a couple (longitude, latitude), and I need to update only one of those two for a given point. I found that it's possible to do so but ...
2
votes
1answer
167 views

Calculating points in the USDA's Cropland Data Layer coordinate system

I need to integrate against the USDA's cropland data layer. They've got a demo and some API docs. The important query I need to run is this, given an (x, y) of say (1551459.363, 1909201.537): ...
2
votes
1answer
3k views

Make POINT from longitude/latitude coordinates from existing table in PostGIS

I would like to make a POINT using the longitude and latitude columns of an existing table. Here's a link to the documentation of ST_MakePoint. Here's my table: CREATE TABLE sysinst.bio ( oid ...
2
votes
4answers
644 views

Query Postgis Table with PHP

Would you be so kind as to help me with the following in OpenLayers. I need to be able to use the coordinates from a user click in a postgis query. To catch the coordinates of a click I built a click ...
8
votes
4answers
11k views

How to get coordinates from geometry in PostGIS?

This line: SELECT geom FROM myLayer.geom will return a hex value, i'm wondering how would it be possible to get decimal values, a result that look likes human-readable coordination? Regards,
0
votes
1answer
352 views

To get attribute data of polygon layer by giving Lat/Lon

Is anyone having an idea about how to get attribute data of a polygon layer by giving Coordinates with in that polygon. Here i have tried with these codes.. SELECT * FROM kar_bbmp_198 WHERE ...
4
votes
1answer
235 views

Spatial index vs two coordinates indexes

I have a table with two columns: latitude and longitude. I want to get all objects inside a "rectangular" (well, rectangular in a lat/lon coordinate metric) bounding box: min-max latitude and min-max ...