0
votes
1answer
63 views

Postgis: Traslate geometry from EPSG:23030 to EPSG:21818, then to lat long

I'm from Colombia, South America. I'm a computer programming student and I have to develop a prototype for a GIS system for my small home town using Postgis >= 2.0 as database back-end. The local ...
1
vote
2answers
122 views

Searching planet_osm_point by longitude and latitude

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads. I have looked at ...
1
vote
2answers
108 views

PostGIS to GeoJSON with GDAL: how to get lat/longs?

I'm trying to convert line features from PostGIS to GeoJSON files, as follows: from psycopg2 import * from subprocess import call conn = connect(dbname='gis') cur=conn.cursor() cur.execute("SELECT ...
1
vote
1answer
130 views

Converting lat-lon from degrees and decimal minutes to decimal degrees in PostGIS [duplicate]

Creating a geometry in Postgis is fairly simple: ST_SetSRID(ST_MakePoint(longitude,latitude),4326); These lat/lon should be in decimal degrees format like 33.02505 -96.70668 Is there a ...
2
votes
2answers
187 views

How to find the row that has a shape file containing a lat long point in my PostGIS geometry column

I am fairly new to PostGis and I'm trying to return a row in my table that has the shape file containing a lat long point I pass in via st_contains. Below is a query I wrote myself that brings back 0 ...
4
votes
2answers
495 views

ST_Distance is not delivering right results

I want to calculate the distance between lat/lon points. I tried the following queries: Select ST_DISTANCE(ST_GeomFromText('POINT(-73.97923 40.75571)', 4326), ST_GeomFromText('POINT(-73.974509 ...
1
vote
1answer
365 views

Accurate and fast nearest neighbour, which distance function should I use and how to it speed up? [duplicate]

I am solving the following problem: I have a map with many points in it and I need to find the nearest point to given location. Each point carries information about it's latitude and longitude. This ...
1
vote
3answers
753 views

What format is lat/long stored in OSM PostGIS?

Question: How do I to get the lat, long for all the toll booths stored in OSM for Virginia? Current Query: > gis=# select * from planet_osm_nodes where ('toll_booth' = ANY(tags)); id ...
2
votes
1answer
483 views

How can I get the corners of a polygon in latitude and longitude?

How can I get the corners of a polygon -a square/rectangle, to be precise- in latitude-longitude format by using its geom value -or some other way, perhaps-? Thanks.
2
votes
2answers
2k views

Problem when calculating longitude and latitude for points

I have a PostGIS database with SRID=900913 (Google Mercator) and I would like to know the latitude and longitude of points. I use this command: ST_X(ST_TRANSFORM(the_geom,4283)) Following what is ...