PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

learn more… | top users | synonyms

0
votes
1answer
95 views

Difference between 2 projections?

I have osm.xml file where projection is defined as follows: Map background-color="grey" srs="&srs900913;" minimum-version="2.0.0"> n settings.xml file projection is also set there as: <!ENTITY ...
0
votes
1answer
58 views

PostGis geometry name lookup failed for table

I have a table name erpAssets which has column name Region of type polygon. it contains entries of points also like (-79.4609576808001,43.9726680183837)). I have written query which convert these ...
0
votes
1answer
37 views

problem transforming pgr route to a line - unexpected extra lines from St_MakeLine

I have created a line geometry from a pgr_dijkstra querry and I am getting an unexpected looking line in qgis. The following image illustrates the problem: The magenta line is the line created ...
1
vote
0answers
26 views

Import raster to postgis and add a foreign key constraint

I use raster2pgsql to import raster files into a table with this command line: C:\Program Files\PostgreSQL\9.3\bin>raster2pgsql -s 4326 -M -F -a c:\temp\mun.tif public.basqui_raster | psql -U ...
1
vote
1answer
82 views

Difference between planet_osm_polygon and planet_osm_point tables

What's the difference between the planet_osm_polygon and planet_osm_point tables? I find similar columns in both tables.
3
votes
1answer
77 views

How to render overlapping bus trips as one route from OSM?

I would like to create bus map for my city from OSM data. I imported data into Postgresql with osm2psql and I can render routes with Mapnik. But the problem is that same route ref is shown multiple ...
0
votes
0answers
27 views

Postgresql (soln would be basic SQL I think): ORDER by distance to a point and return those distances in array pairs w/ the full records

so I know there have been some questions asked about how to calculate distance using postgis and how to order results by their distance from a respective point. I'm not very talented at SQL (at all) ...
0
votes
1answer
28 views

Switch line direction for PostGIS-lines in QGIS or Pgadmin

I am trying to switch the line direction in a PostGIS-layer. The postgis-geometry column is e.g. "LINESTRING(0 0, 1 1, 2 1, 2 2)". The reason is that my symbology is direction-dependent, but I drew ...
2
votes
1answer
27 views

How can I get proj4text from srtext?

I have a custom projection used in some shapes on a prj file. I want to insert this projection in the table spatial_ref_sys PostGIS. The data in the prj file will SRTEXT table field, how can I get ...
2
votes
2answers
83 views

How to find the destination point given a start point, distance and bearing?

If I have a starting point as well as distance and a bearing to the destination point, how can I find the coordinates of the destination point using PostGIS? I'm looking for a PostGIS equivalent to ...
0
votes
1answer
22 views

PGrouting encapsulated queries error [quotes problem]

I'm facing a quote problem on a pgrouting query. What I'm thinking is wrong is that my query only works if I use one, then four, then eight quotes on encapsulated queries. Is there a way to simplify ...
0
votes
2answers
95 views

creating isochrones in postgis/osm2po/pgrouting and then saving the isochrones as polygons

So I am creating some isochrones in pgrouting based upon a table from osm2po. Now I have a query that will get all of the edges that are c driving distance away from a point. My question is, how can I ...
1
vote
2answers
68 views

adding geometries to a source, target table for multiple rows in pgrouting

I am having an issue trying to perform the pgr_dijkstra algorithm and getting back a line in my table for multiple rows. I have a table that has a columns of source, target node id's but I cannot ...
1
vote
1answer
109 views

Help defining custom CRS in QGIS 2.2

I'm trying to use EPSG:4479 in QGIS. 1) If I search for EPSG:4479, it returns a "Imported from GDAL" EPSG:4479, but it does not work. At the console, the following message is displayed: ERROR 6: ...
1
vote
1answer
37 views

PostGis line geometry type

I am using postgresql9.3 and postgis2.1.I imported a shape file into my database. In that the_geom datatype is "LINESTRING" . Now i need a query to find the lines within a given radius for a ...
1
vote
1answer
154 views

Is it possible to get a binary geometry from PostGIS?

PostgreSQL (via C# Npgsql driver) returns geometry column (PostGIS) like a hex string (EWKB as I understand) for this query: SELECT ST_Transform(geometry, 4326) FROM myGeometries; Result (for ...
2
votes
0answers
28 views

Feature service requires registered database error?

I am working on ArcGIS Server 10.2 and SQL Server 2008. when I want to publish the service, I get this error "Feature service requires a registered database" that's error happen when I read (List By ...
1
vote
0answers
60 views

Gaussian plume model in PostGIS or geocouch

Does anyone know of existing code for dispersion modeling using Gaussian Plume or comparable model, that I could plug in / adapt to be used programmatically from PostGIS or alternatively via ...
1
vote
1answer
47 views

TIGER Geocoder not matching intersections without ZIP

I'm using the TIGER geocoder (2013 data, PostGIS 2.1, Postgres 9.3) to geocode intersections in New York City, but I'm finding that if I omit the zip code, I almost never get a match. So, for ...
2
votes
1answer
24 views

Modeling data in PostGIS when Several Join queries with Geometry are Needed

Suppose you have a database where you have several tables with geometric information and you have several cases in your system where you need to query the tables with a lot of joins (ie: LEFT JOIN ...
0
votes
1answer
33 views

Get latitude and longitude of each point forming a MultiLineString

A MultiLineString is formed by a sequence of points and each point has latitude and longitude. Use the sql below to get the latitudes and longitudes of each point so that my MultiLineString: SELECT ...
1
vote
1answer
36 views

Can't get Tiger Geocoder to work in PostGIS

I've installed the PostGIS Tiger Geocoder according to these instructions and loaded in data for the state of New York. Unfortunately, when I try to geocode something... ny_tiger=# SELECT g.rating, ...
0
votes
1answer
60 views

convert data from osm to osm tiles/marble

I need to convert the raw thata OSM XML to tiles styled like standard OSM tiles (and other styles if possible) From the research I've done I've found I need to have osm2pgsql and put it on the same ...
3
votes
1answer
183 views

Problem PostGIS Spatial Query ST_Contains ST_Disjoint ST_Intersects

I'm working on a project with two different tables inside a database. One contains points in a column geometry(Point,4326) type and the second one has a column geometry(MultiPolygon,4326). Now I would ...
0
votes
1answer
33 views

Smartest way to union different “layers” in postgis

I'm currently using this crude approach to combine several tables/layers : CREATE TEMPORARY VIEW p_impd_800 AS ( SELECT st_union(geom) as geom FROM rt_201 UNION SELECT st_union(geom) as geom FROM ...
1
vote
0answers
99 views

How to fix “Raster layer: Provider is not valid” error when loading PostGIS rasters?

I compiled and installed the current QGIS master as usual and I imported some raster data into my postgres 9.3 database with postgis 2.0.2 extension. Whenever I try to import the raster data into qgis ...
-1
votes
2answers
109 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().
0
votes
1answer
89 views

Import Shapefile on postgis doesn't show in QGIS

I'm currently working on a project about a database and some shapefiles. The database is built on PostGis with tables including some dots as geometry type columns. Once imported them on QGIS, I can ...
1
vote
0answers
99 views

Why does QGIS crash when my PostGIS table has a primary key?

Configuration: PostGIS Library: 2.0.3 GEOS: 3.3.8-CAPI-1.7.8 Proj: Rel. 4.8.0, 6 March 2012 PostgreSQL 9.2.2, compiled by VC++ build 1600, 64 bit, running on Win2012 server 64 bit QGIS 2.2.0 - 32 ...
1
vote
2answers
99 views

Most optimal way to create a (spatial) database for big amounts of data?

I am using QGIS, and on my way to set up a huge spatial database (geographical), where most of the data is points without geometry), along with other types of data (like lines in DXF and areas in ...
0
votes
0answers
48 views

Error adding Geoserver store from PostGIS

I cant get a connection up when creating a PostGIS-store. Geoserver is running fine on IP:80/geoserver. PostGIS is running and working fine with psql commands Created database/table 'mydb' and ...
0
votes
1answer
54 views

an efficient way to find the pgrouting edges contained within an isochrone

So I am working with some pgrouting road network data in postgis2.0/postgresql 9.1. I am interested in routing around certain types of disasters like tornados or such. If a disaster event happens at ...
1
vote
1answer
43 views

ERROR: line_locate_point: 1st arg is not a line

My test scenario is to confirm the image below, I select the points on the line in order of the direction the line was drawn. I used the sql: Select testepoint."id" FROM testepoint ...
1
vote
1answer
41 views

can I add additional data to an existing pgrouting postgis database using osm2pgrouting?

This is just a simple question but I could not find the information in the documentation. If I have an existing pgrouting database table named routing, can I add additional OpenStreetMap data to this ...
0
votes
1answer
79 views

POSTGIS raster/Java with GDAL bindings - Load byte array in Gdal Dataset Object

I would like to load a raster as java.awt.image.BufferedImage (or equivalent class that would allow to perform some display) out of my PostGIS database. My Raster is inDb (loaded with raster2pgsql) ...
0
votes
1answer
87 views

Error importing shapefile into postgreSQL using shp2psql

I've tried this a few different ways and keep getting the same error. I have a shapefile currently in WGS84 UTM Zone 15 which is SRID 32615. I used the ArcMap multipart to singlepart tool to create a ...
1
vote
0answers
45 views

Point in Polygon operation for 100G of data

I have lat/lon point locations for over a billion points, all based in the US. For each point I would like to generate a dataset that links them to their county and to their MSA according to US Census ...
0
votes
1answer
51 views

Sql to view points of intersection with line not working

I have two tables one called test lines and other points called testepoint with some geometries drawn in QGIS to test my sql. Are as in the image below: I want to select the points that inteceptam ...
3
votes
2answers
119 views

How to connect points (bus stops), which don't lie on the lines (LINESTRING), to a network?

I need to connect bus stops (points) to a network layer (OSM data). These bus stops do not lie directly on the lines (see screenshot) nor should their location be moved. I use PostGIS, pgrouting and ...
0
votes
1answer
86 views

How to calculate the track length of GPX files with PostGIS?

I am trying to calculate the length of a GPX track. The original GPS data looks like this: <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <gpx ...
0
votes
0answers
25 views

postgis — return records sorted by size of st_intersection

I have two sets of spatial records in two different tables. I'm in rails so I'll show my code in that way seeing that its source: one set is CensusPlace records, which are US Census Tigerline ...
0
votes
1answer
62 views

Import raster into PostGIS using Python

I am trying to import information from a Bathymetric Attributed Grid (BAG) file into PostGIS using Python and psycopg2. I'm working, for now, on a Windows box with pre-compiled packages, so I don't ...
0
votes
2answers
71 views

ST_Expand return different results depending on meters [duplicate]

I am very confused by getting different results from st_expand (srid 4326). I want to do a search within a bounding box, therefore I pass a point and I'd like to provide distance in meters in order to ...
1
vote
0answers
36 views

PostGIS automatically creating geometries after importing using QGIS DB Manager

I have a shapefile consisting of linestrings, in which some of the features have null geometry. Yet, after importing it to PostGIS, using QGIS' DB Manager, a geometry is created for those features ...
0
votes
1answer
52 views

Add GPS tracks directly to a PostGIS table

Disclaimer: I am a total GIS newb and I have a use case I have not seen elsewhere. Background: I drive country roads looking for old building, cemeteries, school houses, etc and I record the ...
3
votes
1answer
118 views

Local Copy of OpenStreetMap of my City in PostGIS Database

I would like to use OpenStreetMap vector data for land cover analysis in my city. Here is my goal: I set up a PostGIS database with the city area extent (around 20x20 km) on my server. I will ...
2
votes
1answer
86 views

Using PostGIS functions in ArcGIS Desktop for Layer Definition Query?

I am connecting ArcGIS Desktop 10.2 to Postgis 2.0.3 with PostgreSQL 9.2.4. No SDE. I can load data with no problems and access the data in ArcMap. However I can't seem to use PostGIS functions within ...
3
votes
2answers
86 views

How do you determine how straight a LineString is? [duplicate]

I have a bunch of LINESTRINGs and need to classify them based on how strait they are. My idea is to compare the length of the LINESTRING to the distance between the first and last POINTs. I'm ...
2
votes
1answer
34 views

Postgis Raster merge geometry

I have a raster table and a geometry table in postgis. My goal is to create a single raster merging elements from both:- WITH geom_raster AS ( SELECT wkb_geometry, ST_AsRaster(wkb_geometry, ...
4
votes
3answers
337 views

QGIS, Postgis: Geometry type does not match column type

I'm trying to import some polygon shapefiles to Postgis in QGIS via SPIT. One of them can't be imported and returns this error: ERROR: Geometry type (Polygon) does not match column type ...