# Tagged Questions

193 views

### How do I calculate Manhattan distance with PostGIS?

I am using the ST_Distance function to calculate the distance between two geometries (a train station and a building) Since I know that all buildings and all train stations are in Chicago, which has ...
48 views

### GeographyFromText and ST_SetSRID+ST_MakePoint different results?

Why am I getting different results? SELECT ST_DISTANCE( ST_GeographyFromText('SRID=4326;POINT(13.401111 52.383343)'), --berlin ST_GeographyFromText('SRID=4326;POINT(9.997559 53.533778)') ...
318 views

### clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
252 views

### Proximity search: ST_DWithin vs ST_Distance?

I have records stored in a table with latitude/longitude coordinates stored in a geometry field. I want to find all records nearby a user supplied reference point. Note "nearby" probably means less ...
234 views

### Mimimum distance between points (Postgres/PostGIS)

I have a table (tab_Cities with cities which own more than 50000 inhabitants. The table also contains lat, long and the_geom as columns. I can already see the points via QGIS. Now I want to write a ...
966 views

### Distance between DB field and Point using PostGIS

I'm using Postgresql 9.0 with PostGIS 2.0 extension. I've got the table and geographic field location: =# SELECT * FROM geography_columns; f_table_catalog | f_table_schema | f_table_name | ...
324 views

### How can I make a Postgres/PostGIS ST_Distance_sphere query more efficient?

Within Postgres/PostGIS I have written an SQL query to get the closest distance for each element within a point coordinate table from a polyline table. The query comes back and works correctly, but ...
548 views

### Getting points within a range from a postgres database?

ok so this is query i'm making which returns no result: SELECT building.gid FROM building WHERE ST_Dwithin(building.geom, ST_GeomFromText('POINT(long lat)',4326), 400) If I run this ...
448 views

### Implementing custom (Vincenty/Haversine formula) functions for MySQL vs Using PostGIS?

I currently am using MySQL for all of my relational data. I have hit a crossroads with geo calculations. Since, MySQL does not have good support for spatial functions, I am contemplating on using ...
831 views

### PostGIS - Calculate progressive distance between points on a GPX path

I am attempting to build an elevation profile using PostGIS-PostgreSQL only. I have imported GPX data in my PostGis database, so now I have a table full of the GPS coordinates of the track and the ...
630 views

### How to find the two furthest points between a group of points?

I have a table with 20000 records and with those columns Shop, longitude, latitude, geom I would like to find a way to find the pair of ths farthest shops between a selection of shops For example we ...
2k views

### How do I get the distance meter value between two geometries in PostGIS?

I have a simple question about calculating distances in PostGIS. I would like to get the distance between two geometries. I am using this sid : 4269 in meters what i am doing now is this : ...
2k views

### How do I perform a proximity search with Postgis?

OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog. So after all of that, I ...