Linked Questions

23
votes
2answers
15k views

What is the Difference between Geometric and Geographic columns? [duplicate]

I am a beginner in GIS and Learning PostGIS. I came across this two terms Geom and Geog, Could anyone explain in brief. What is the best to use with map data and Do all functions support both Geom and ...
5
votes
1answer
2k views

Find number of points within certain radius of a set of points

I have two tables. One is a list of stores (with lat/long). The other is a list of customer addresses (with lat/long). What I want is a query that will return the number of customers within a certain ...
3
votes
2answers
1k views

How to find the closest segment to a point

I am trying to find the closest road segment to a point that I have and return an attribute from the closest segment to the given points. I know in PostGIS I need to use ST_ClosestPoint, ...
3
votes
2answers
1k views

Purpose of geography_columns and geometry_columns views in PostGIS?

Can anyone tell me what is the purpose of geography_columns view and geometry_columns view in a PostGIS database? My geography_columns view is empty so I can't see what the purpose of it is.
6
votes
2answers
2k views

Choosing datatype for holding Latitude, Longitude and Altitude in PostGIS?

I'm trying to take advantage of the many functions available in Postgis for dealing with latitude and longitude coordinate systems. However, I would like to add some altitude information to my ...
1
vote
1answer
527 views

Why does ST_Area return different results for geog vs geom?

I have this simple query that returns very different values for a geom vs a geog: SELECT ST_Area(the_geom::geography) as area1, st_area(the_geom) from neighborhood where city_id='ny-new-york-city' +-...
3
votes
1answer
554 views

Confused about ST_DWithin function postgis

First Time here. Anyway, I have a database that I want to use to store user locations. I want to be able to get all the users with in say 15 miles. How do I do this. I'm using PostGIS 2.1. My SQL ...
4
votes
0answers
851 views

How to import PostGIS layer with geography type to QGIS?

I tried to import in QGIS a layer from a PostgreSQL table with a geography type column created through the extension PostGIS. I noticed that QGIS doesn't seem to like the geography column... Here ...
1
vote
2answers
448 views

How can I measure linestring on postgis?

I have a linestring and I want to measure this line. I try it on google maps. the result is that 0,65 km https://www.google.com/maps/dir/40.144048,26.45235/40.138443+26.450246/@40.1412448,26.4467258,...
2
votes
2answers
120 views

CartoDB's SQL API: Row too large

I am trying to run the following PostGIS query using CartoDB's SQL API: SELECT the_geom, ST_Area(ST_Intersection(the_geom::geography,ST_Buffer(ST_SetSRID(ST_MakePoint(-52.4379, -12.6235),4326)::...
4
votes
1answer
153 views

Calculating mileage from linestring

I'm looking to calculate the approximate distance in miles from a linestring. This post recommends using ST_Transform in conjunction with the State Plane coordinate system for my area. In my case, I ...
2
votes
1answer
134 views

How to set my ESPG to geography POINT in PostGIS?

I'm trying to create a table into my PostGIS 2.3 CREATE TABLE destinations ( id serial PRIMARY KEY, sector integer REFERENCES sectors(id)...
1
vote
0answers
154 views

Appropriate data structure for a bunch of polygons

I'm not a GIS guy so this might be a very misguided question. At present I have compiled a python dictionary, on which I perform some simple processing and return some answers. My data is structured ...
1
vote
1answer
80 views

Is product purchaser in distribution area?

I am going to be using PostGIS 2 to create a lookup service. Given a point (lat/lon), I need to either find if a product can be distributed there, or b) a list of products or distributors. I am ...