Tag Info

New answers tagged

0

You can install the latest GDAL binaries from http://www.gisinternals.com/sdk (if it is not down) or OSGEO4W and run ogr2ogr with a batch file containing ogr2ogr -f KML testout.kml testin.gpx


1

You can generate a mesh of, for example, 0.001 degrees on each side, and make a reverse geocoding for every point. The google geocoder service would answer with N possible addresses. Each reverse geocoding request would have the following structure var latlng = new google.maps.LatLng(lat, lng); geocoder.geocode({'latLng': latlng}, function(results, ...


2

GPSBabel will do pretty much any of that. HERE is the Link! From the documentation ... What is GPSBabel? GPSBabel converts waypoints, tracks, and routes between popular GPS receivers such as Garmin or Magellan and mapping programs like Google Earth or Basecamp. Literally hundreds of GPS receivers and programs are supported. It also has powerful ...


1

I have switched to using gdal through python - my solution is: cmd = 'ogr2ogr -f GPX -dsco NameField=TYPE {0} {1}'.format(outFile, inFile) os.system(cmd)


1

I had a similar problem and used a kml parser (geoxml3) to locally parse a kml. I later ended up storing each kml file as a database table and looping through the records to plot a polygon. Loading the kml from a server was the slowest of all.


1

If anyone else has problems with this the best solution I have found is: find the ratio between the measurements in the two projections, divide the desired measurement by the undesired measurement, then multiply the answer by the desired measurement. For example: The measurement ratio between QGIS EPSG 3857 and Google Earth was 200m:153.15m. I need points ...


0

The previous answer has an invalid xmlns. I think the correct one will be: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <Style id="0"> </Style> <Placemark> <Polygon> <outerBoundaryIs> <LinearRing> <coordinates> ...


0

I don't think KMZ has a size limit, but I'm pretty sure that a 2gb kmz file would be hard to manage by Google Earth/Pro. I would suggest you to clip it into different regions, so that you have smaller files. You can open/change format/clip the KML using different softwares, the ones that I would use are Global Mapper / ArcGIS with Xtools. But perhaps ...


0

If you render raster data into map tiles you have to choose whether you want to create a Google Earth tiles (in Plate Carree) for displaying in KML/KMZ or Google Maps tiles (Mercator) for displaying in the web viewers such as OpenLayers, Google Maps, Leaflet, etc. These uses two different map projections. Cartographically correct solution is to render two ...


2

No need for a third party tool. Change the extension to .zip, open and extract the file you want.


1

Where is your image ? There was lots of Python modules to parse KML files (Pypi: KML) and you can also use all the Python modules to parse XML files (Pypi: XML), lxml is one of them, but not the easiest to use. For example bikepathparse.py is a script that parse a KML file (with lxml), and return path list of dictionaries with lists of coordinate points ...


0

OK, figured it out: it was indeed both an OpenLayers- as well as I'm-an-idiot thing. I was fretting about strings and floats because I was trying to make the radius of circle-markers proportional to an attribute value in my kml layer's features. The OpenLayers tutorial examples I was following all used toy vector layers added manually as part of the map's ...


1

I would stop what you are doing and have a look at the KML specifications as what you appear to be generating albeit wrong does not conform to KML standards. Have a look at this tutorial and study the structure, you don't appear to be enclosing it in a placemarker tag? So even if you get your address sorted it would be invalid KML. Personally if this was me ...


0

you have a couple of js bugs on your page... window.onload=function() { var formref=document.getElementById("switchform") indicateSelected(formref.choice) } there is no element with id = "switchform". try fixing that. and maybe try putting this: <script language="JavaScript"> $(document).ready(function() { $(".topnav").accordion({ ...


1

I created a shapefile with attributes of type string, integer, double, and date. Then I converted the shapefile into KML with GDAL 2.0-dev version. ogr2ogr -f kml type.kml typetest.shp Resulting KML file contains schema definitions in the end of the file. <?xml version="1.0" encoding="utf-8" ?> <kml xmlns="http://www.opengis.net/kml/2.2"> ...


0

user30184 has provided the answer I needed. ogr2ogr has the capability to work only on data within a given geographical bounding box. (I was indeed missing something obvious). ogr2ogr -f "KML" OutputFileName.kml InputFileName.TAB -sql "select RNumber from InputFileName where ((RType = 1 or RType = 2) and OStatus >= 3)" -spat xmin ymin xmax ymax Where ...


0

This image shows the states shapefile and clipping box with extents from 130°E to -90°E and from 20°N to 50°N. First ogr2ogr command is using -spat parameter for selecting features and the second one is using -clipsrc parameter which is clipping features along the selecting geometry. ogr2ogr -f "ESRI Shapefile" -spat -130 20 -90 50 selected.shp ...


0

From the GDAL manual http://www.gdal.org/drv_kml.html: Note that KML by specification uses only a single projection, EPSG:4326. All OGR KML output will be presented in EPSG:4326. As such OGR will create layers in the correct coordinate system and transform any geometries. So there is nothing much you can do about it, except looking for another ...



Top 50 recent answers are included