1
vote
2answers
80 views

invalid KML representation on ST_GeomFromKML

I exported a table with a geography(MultiPolygon,4326) column using ogr2ogr to a KML file. When trying to re-import any of the shapes using the ST_GeomFromKML function I get the following error: ...
2
votes
1answer
137 views

Problem with reading data from PostGIS as KML file using PHP

I am using the following PHP code in order to read data from PostGIS and save it in KML format as a file. When I load the page a document with ".PHP" extension is returned (not .kml) which inside has ...
0
votes
0answers
77 views

Parameterizing SQL Views Timestamp Issue

Could Someone help me? I am having some difficulties creating KML views. I am trying this SQL: SELECT the_geom FROM lighting.history WHERE stroke_time BETWEEN %inicialtime% and %finaltime% and ...
1
vote
1answer
310 views

How to render GPX files in TileMill?

I want to show a number of GPX files in a TileMill map. Here's the process that I thought would work: gpsbabel -i gpx -f "$myfile" -o kml,lines=1 -F "$myfile.kml" Add as layer in Tilemill, style ...
0
votes
1answer
138 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 ...
1
vote
1answer
670 views

How to export from PostGIS to KML

What is the best way to export from PostGIS to KML using open source tools? Can I do it directly, or do I need to first export to shape files?
2
votes
1answer
616 views

KML from PostGIS Geometry into Openlayers

im getting the KML value from my postgis database.. st_askml() And the output is like this: ...
2
votes
2answers
1k views

KML from EPSG:4326 to EPSG:900913

im trying to create KML files manually (XML format) by extracting data from a postGIS database with "geography" values in a column. But i belive i need to transform the projection of each row in the ...
6
votes
1answer
4k views

How to import KML file, with custom data, to Postgres/PostGIS database?

By custom, I don't mean a different structure of KML file, but in <description></description> section, I have data with HTML tags of this kind: <?xml version="1.0" ...
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 ...
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
809 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
1answer
885 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 ...
1
vote
0answers
244 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
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 ...
2
votes
3answers
524 views

How to create a efficent linestring out of geography points using postgis

I'm trying to create a linestring out of geography points. At the moment I'm doing it like this: select ST_GeographyFromText(ST_Makeline(a.record_point)) from ( select (record_point::geometry) from ...
2
votes
3answers
2k views

Render vectors from OSM data in POSTGIS database

I'm a newbie when it comes to mapping application. I had successfully loaded my OpenstreetMap data in a Postgresql/PostGIS database. Now my problem is how to render the vector data (the POI's, ways, ...
3
votes
4answers
3k views

Live KML from PostGIS to Google Earth

I was wondering if anyone knew a way to bring data from a postGIS database into Google earth to view live. I know of the asKml function in PostGIS, but I'm interested to know if anyone had managed ...