3
votes
0answers
46 views

Create a Shape file from Sql dump file

I am trying to map data by querying a table called xyz. I need to show the the_geom data on the map. I have below query in my mapserver .map file: DATA "the_geom from xyz using unique id using ...
1
vote
1answer
137 views

Converting file geodatabase with coded domains to PostgreSQL / PostGIS?

We have several file gdb's and would like to convert these to Postgres / PostGIS. We've used ogr2ogr to transfer these files; however, some of the fields are stored as coded domains and the fields are ...
0
votes
0answers
60 views

Multiline String to Linestring conversion

I have road network table which is multilinestring.I was trying to convert this file to Linestring using the following query ALTER TABLE multiline ALTER COLUMN the_geom TYPE geometry(linestring,4030) ...
1
vote
1answer
85 views

Trouble using ogr2ogr w/ -s_srs to combine inconsistent EPSG files into my postgis DB

I'm having trouble combining shapefiles from TIGER and different local governments into a single postgis db to query legislative locations. I've imported all data to multipolygon geom, but found some ...
1
vote
1answer
218 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 ...
0
votes
1answer
80 views

Convert an area to meters² in PostGIS

I have this query : SELECT ST_AREA(geom::geography) FROM region The (geom) contains polygons from a shapefile imported into PostGIS with shp2pgsql. I've appended ::geography, else the result of ...
4
votes
1answer
124 views

How to transform a set of street-segments into city-blocks, with PostGIS2?

Theoretically is possible to obtain the polygons of city blocks (urban blocks) from streets, when streets are represented by street axis (LineStrings). The urban blocks are bounded by streets, so ...
0
votes
1answer
173 views

How can I convert a set of coordinates from a linestring to wkb for storage in postgis?

I have a set of coordinates that come from a kml file and I would like to convert them to wkb for storage in my postgis database. When I use st_geomfromkml, though, I get an error that says I have ...
2
votes
2answers
177 views

Extract PostGIS line features to GPX

I have a request to provide GPX files of certain trails (around 100) that are present in OpenStreetMap. Given a local PostGIS install with OSM data, I think the process would be something like: ...
0
votes
1answer
103 views

I have line strings in points and need to conver them to lon/lat degrees

I need to convert line strings back to latitude & longitude coordinates. Here are is an example, please keep in mind that they do NOT reference the same point. I have included the values to ...
1
vote
1answer
964 views

postgis distance calculation between points with lat, long coordinates

Team, I am new to postgis, but a postgres user for quite a while. I would like to compare the geospatial capabilities between postgresql and mongodb. I have the lat.lon, zip code of US locations; ...
3
votes
2answers
1k views

Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
1
vote
0answers
176 views

Renaming Columns in Geotools FeatureType

I am attempting to build a simple java program that loads shapefiles into a Postgis 2.0 database. Everything is working out great except that I would like to be able to modify the FeatureType in the ...
3
votes
0answers
210 views

Creating Ellipse in WGS84, but with metric parameters

I have the function --Ellipse(x,y,rx,ry,rotation,#of segments in 1/4 of ellipse) SELECT ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(0,0), 0.5, $6), $3, $4), $5), $1, $2) I have points in ...
1
vote
2answers
592 views

dealing with 2 different coordination systems in postGIS

I'm seeking a function that converts degrees to the following format: POINT(405115.926025391 4543389.4354248) I dont know this format's name, but is there any function to do so? Cheers, EDIT ...
11
votes
4answers
14k views

How to get coordinates from geometry in PostGIS?

This line: SELECT geom FROM myLayer.geom will return a hex value, i'm wondering how would it be possible to get decimal values, a result that look likes human-readable coordination? Regards,
4
votes
2answers
971 views

How to convert 3D DXF to PostGIS 2.0?

I'm not very skilled on using postgis but I face a problem that I must solve, i.e. create tables to load geographical data stored as dxf. I have a thousand dxf files (3d) with polylines, points and ...
3
votes
1answer
126 views

How to typecast from MULTIPOLYGON to MULTIPOLYGONM (force XY multipolygon into XYM)

I need to merge several databases, where the destination table has a constraint checking for MULTIPOLYGONM in the geometry column. At some source tables, the geometry column is in the XY form ...
5
votes
2answers
2k views

ogr2ogr kml to shp conversion created 184 shapefiles?! What am I missing?

I'm trying to convert this KML dataset of ice arenas to a shapefile using ogr2ogr (GDAL 1.8). After some initial troubleshooting to get the script running, it's creating 184 different shapefiles (736 ...
9
votes
4answers
1k views

Alternatives to ogr2ogr for loading large GeoJson file(s) to PostGIS

I have a 7GB GeoJson file that I would like to load into a PostGIS database. I have tried using ogr2ogr but it fails because the file is too big for ogr2ogr to load into memory and then process. ...
6
votes
1answer
5k views

How to convert a String to OpenLayers.Geometry.Polygon using javascript?

First let me say that I'm using Javascript, jQuery, Java, GeoServer, OpenLayers and PostGIS. Using java class ResultSet I return this String: POLYGON((516000 2135000,515039.264020162 ...
21
votes
4answers
3k views

Bulk load multiple shapefiles into PostGIS

I've got over a hundred data layers in shapefile format that I want to upload into a PostGIS database. They are all in the same projection, but represent different data layers so they do not have the ...
5
votes
2answers
2k views

Geodatabase to PostGIS character encoding

Similar to another question I posted previously, I'm trying to import datasets from Esri geodatabases into a PostGIS database directly, and inside the data there are greek letters and symbols that are ...
2
votes
1answer
444 views

How to convert SHP/POSTGIS data into x, y, z, “cost” data?

Is there a way to convert a line layer (shp or PostGIS) data into (x, y , z, cost) i.e. (From_node, To_node, optional_Elevation, Cost/Weight) ?