Tagged Questions

PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
1answer
285 views

How to use ST_Length?

I want to calculate the lenght of the line inside the polygon. If I do this: SELECT ST_Length(ST_Intersection(ST_Transform('SRID=3035;LINESTRING(4000000 3000000, ...
2
votes
2answers
1k views

Why am I unable to publish a postgis layer to geoserver?

I left arcgis and microsoft sql and now I am trying to connect Qgis+PostgreSQL (PostGIS) + GeoServer. I've brought my postgis database to the server, created a "store". And now I'm trying to publish ...
10
votes
1answer
516 views

How to get the length of a line inside a polygon

How can I get the length (brown marked part) of the "Road 7" inside the red polygon? My start: SELECT ST_Length(way) FROM lines WHERE road = "Road 7" AND ST_Intersects(line, polygon)? With that, ...
6
votes
3answers
1k views

Direct connecting to PostgreSQL from ArcGIS Desktop? [duplicate]

I am trying to connect to Postgresql database that I just installed on my server machine. As instructed by Esri I have download from postgres and installed psqlodbc. However, when I tried to add the ...
4
votes
2answers
2k views

Using PHP with a web application?

I have been working on creating a web mapping application using ArcServer 10 and the JavaScript API. Recently I was told that queries need to be run using PHP due to prior work by another team. The ...
2
votes
2answers
398 views

How to pull lat/lng from a map canvas and update a database

So if i want to pull out lat/lngs after user clicks on a map canvas (lat/lngs are pulled using any javascript API (leaflet, wax etc.) and add this to a postgresql database using a query, how do i do ...
6
votes
2answers
2k views

Can we direct connect to PostgresSQL without ArcSDE

I have postgreSQL installed on my machine.My machine already has ArcGIS 10. No Sde installed. Can we create geodatabase in PostgreSQL with out installing ArcSDE? Jay Cummins is right. I am intended ...
4
votes
2answers
610 views

Unable to create a geometric network in a PostgreSQL Spatial Database Connection

I've created in ArcCatalog a Spatial Database Connection to an PostgreSQL database server. I've imported there all my data (from a local hard drive) and now I want to edit them. But apparently I ...
6
votes
2answers
343 views

Do large vertex counts cause performance issues?

I have a table of several thousand tuples - each tuple has a geometry column. The problem is, these geometries have a large vertex count. The max vertex count is 400, while the average is 200. ...
1
vote
1answer
181 views

Interpreting the geom_way in the table created using osm2po [duplicate]

Possible Duplicate: Issues while plotting the results of pgRouting shortest path I am trying to actually figure out what this column exactly represents and how to use that in my case. I ...
0
votes
1answer
300 views

How to get points in bounding box by degrees for map

I have some concerns about working of BOX3D PostGIS function. I tried to find places in square -158.721365889063 66.09275164148659, 154.608712235937 52.56807548751039(degrees). But this where ...
4
votes
1answer
263 views

How to update attribute values of points outside an area?

I have two datasets in PostGIS 1.5 (on Postgres 9.1) one of polygons and one of points. I am hoping to create a SQL command that will select all of the points in a dataset that are not within of the ...
1
vote
1answer
119 views

How to select data inside a tile?

I have an OpenStreetMap PostGIS database and would like to select specific data (for example all shops) of each tile (on a defined zoomlevel) on the planet. Is this possible to achieve and if yes, ...
1
vote
0answers
756 views

Geometry contains non-closed polygon: GeoServer output from PostGIS

I have imported a shp file using PostGIS shapefile loader plugin for pgAdmin3. The geometry type of the table created is MultiPolygon. I have cross checked the same using the following query. SELECT ...
2
votes
3answers
362 views

PgRouting routing algorithm from start to end via nodes with restrictions

I have the following situation: I want to find the shortest route from A to B through nodes (C,D,E, etc.) with turn directions and road type filtering. Is there a way to accomplish this using ...
8
votes
1answer
4k views

How to create a table from existing tables (applying new schemas) in postgis DB?

I have a table that is geospatially enabled; that contain world borders. I want to break it down to different schemas (global, europe etc..) . My thought is to use use something that looks like this: ...
2
votes
4answers
457 views

Any pgrouting enabled hosting providers?

I am really interested if any of you know about a hosting provider that offers postgis & pgrouting pre-installed? If not, can I just go ahead and purchase a linode hosting account and do all the ...
2
votes
3answers
514 views

Which open source software to create desktop interface for Geo-processing tools?

I want to create an desktop interface to create geo-processing tool and that to using Open source GIS software. I will be using Postgresql and postgis too to save and retrieve data for operations. I ...
5
votes
1answer
642 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 ...
1
vote
1answer
155 views

Is it possible to use assign_vertex_id() POLYGONs?

I'm trying to use pgrouting in order to create a graphe and I have two questions : Is it possible to use the function assign_vertex_id() with a POLYGON geometry type? I always have the following ...
-1
votes
0answers
45 views

Determine the Closest road to a GPS point [duplicate]

Possible Duplicate: Calculate distance of point from an arc/polyline I have been trying to find the road to which a GPS point is closest to. I have a postGIS database which i loaded with ...
2
votes
1answer
450 views

How to solve postgreSQL error when using QGIS Cloud plugin?

I created a qgis cloud account and installed the plugin. When I attempted to Upload Data using the plugin, I got the following error: postgreSQL exception: ERROR: "MD5" authentication with pgpool ...
2
votes
1answer
406 views

osm2pgsql finishes processing without creating vertices_tmp table

I am using postgresql 9.1 database with posgis installed. I also have pgroute installed on same database. I am trying to use osm2pgsql tool to import data for routing. But osm2pgsql tool finishes ...
3
votes
2answers
725 views

Merging polygons that intersect by more than a specified amount

I am working with a dataset that contains a subset of property boundaries in a local government area, thus my dataset is made up of several thousand properties but not all are touching. Since it is a ...
4
votes
4answers
3k views

Calculate distance of point from an arc/polyline

Using Postgres/PostGIS, I am trying to query the database for the closest arc to a particular GPS point. Each Arc is made up of two nodes that are GPS points on a map. Is there a way I could query ...
1
vote
1answer
3k views

Google Maps MarkerClusterer - Remove all clusters

So, I have a PostGreSQL DB with 317 datapoints - all spatially enabled through PostGIS. I have queried this using PHP as GeoJSON and overlaid it on Google Maps (using a converting routine). I have ...
13
votes
2answers
25k views

How to insert a point into postgis?

I have created one table in my Postgis. But I can not insert point. I do not know what's wrong with my query? CREATE TABLE app ( p_id INTEGER PRIMARY KEY ); SELECT ...
4
votes
2answers
5k views

Struggling with enabling a PostGIS database on Mac

I have installed PostGIS on the mac using the binaries available on http://www.kyngchaos.com/software:postgres Postgres v 9.1.3 PostGIS v 2.0 After that I want to enable postgis for my database. I ...
2
votes
1answer
3k views

KML PHP parser to INSERT into database

So I have a KML file which has attribute data(Inside the tag with about 12 data points). This file was generated on ArcGIS. I'm trying to write a PHP script to parse this KML file and insert the ...
6
votes
1answer
621 views

Data visualization and maintenance tool

Background Looking to leverage an existing GIS system for exploring organizational data. Architecture The following figure represents a high-level overview of the system's desired features: The ...
4
votes
1answer
1k views

How to design model in Django using GeoDjango?

I am using Postgresql 9.0 and PostGIS 2.0. I am using Django 1.3 and GeoDjango.I have model with id,latitude,longitude and placename. All the places are in USA. My requirement is following - User ...
2
votes
2answers
592 views

Why does Mapserver throw “msQueryByPoint(): Search returned no results.”?

I have been trying to configure a QUERY using mapserver. Below is the mapfile: MAP NAME "Fourth" UNITS dd EXTENT 58.206740 5.756104 ...
1
vote
1answer
339 views

Identify functionality using mapserver

I am just creating a simple web application using mapserver. It has the basic pan, zoom in/out functionality. Now what I want to try is to get an identify functional added into it so that when I click ...
2
votes
1answer
601 views

Error while rendering a layer from postgresql in mapserver

I got a point layer into QGIS from postgresql database. After this I used a plugin to export it to a map file.After exporting the following is the starting of the map file. NAME "QGIS-MAP" # Map ...
4
votes
3answers
2k views

Geometry issues when creating table from existing spatial table

In short, I want to split an existing spatial table into two parts. The split itself is straight forward. I start with this (fully functioning) table: CREATE TABLE table ( my_identifier smallint, ...
3
votes
4answers
2k views

How to ceate a point layer from a table in PostGIS?

I have a table in PostgreSQL(postgis). This table has latitude and longitude values in it. Now I want to plot these point in qgis. The only thing I could get done was connecting to the database from ...
3
votes
2answers
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 : ...
4
votes
1answer
358 views

Find the farthest point (PostGIS)

I have a table with 2000 records and with those columns OutletName, longitude, latitude, geom I would like to find a way to find the farthest outlet between a selection of outlets For example we ...
7
votes
1answer
2k views

Output polygon data from postGIS and read it on Google Maps API

So, I have a group of polygons stored in PostGIS. I'm trying to build a web application with Google Base maps (using Google Maps API). Now, How do i output the polygons in the right format so that ...
5
votes
2answers
897 views

Loading data onto PostGIS using KML files with attibute data

So, I have a kml file which contains 317 data points (317 polygons and the respective 317 names). The kml file also contains attribute data which pops up in a bubble on Google earth with about 12 ...
3
votes
2answers
959 views

Convert KML to shapefile without losing attribute data

So I want to convert KML files to SHP shapefiles to load it onto PostGIS. Currently I'm using ogr2ogr to do the conversion for me, but it wipes out all the attribute data. How do i preserve this ...
3
votes
1answer
595 views

Using Google Earth as view with SQL Server or Postgres Database

How do I connect Google Earth with any relation database? I have live database containing spatial co-ordinates i.e latitude and longitude. User should be able to view these live data on google earth.
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 ...
3
votes
1answer
2k views

How to get the coordinate system from a PostGIS database?

My question is probably amazinlgy stupid, but I can't find the answer myself. I would like to extract from a database the latitude and longitude of points. For now, I'm getting x(the_geom) and ...
3
votes
1answer
300 views

Is ST_GeomFromText better than providing direct geometry?

I have been working with postgis recently,and in my query if I use ST_GeomFromText it execute faster than running a sub-query to get geom. I thought ST_GeomFromText will be more expensive but after ...
4
votes
2answers
871 views

Changing Buffer table geometry dynamically in PostGIS using plain SQL

I have two tables in PostGIS, a point and a point_buffer table. The point table has a buffer_distance field, with a default value say 200. Now I want to change the buffer table geometry whenever I ...
1
vote
0answers
252 views

Live KML Feeds - From the Ground Up, How Would You Build It and Why?

I found the "Live KML from PostGIS to Google Earth" post very informative but a bit daunting for someone new to the open source world of products like PostGIS and GeoServer. If I am building the ...
5
votes
3answers
2k views

Can I connect (& edit) to a postgresql database with arcgis without arcSDE?

After trying in vein to get spatialkit and zgis working with my postgresql database in arcgis 9.3 and 10 , I was wondering if anyone has had any luck with these products. My postgresql database has ...
1
vote
2answers
747 views

Projecting OpenStreetMap data in PostGIS

I've loaded an extract of Openstreetmap data into a Postgresql database with PostGIS 1.5 using the following command withosm2pgsql.exe: C:\Program Files (x86)\HOTOSM\bin>osm2pgsql.exe -c -s -H ...
5
votes
1answer
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 ...