New answers tagged

2

use ogr2ogr with the -simplify flag. Simplify tolerance must be in map units. If your coordinates are in degree you must also use degree (0.00009 degree ~ 1 m close to the equator) org2ogr -f KML -simplify 0.0001 outfile.kml infile.kml


1

Try ogr2ogr ogr2ogr -f KML scotland.kml infuse_ctry_2011.shp However, your shapefile is very detailed and the output KML is huge (54 MB). Most apps won't be able to handle such large KML files. Do you need all the details or can you simplify the geometry a bit to reduce the number of vertices? Try ogr2ogr -f KML -simplify 10 scotland.kml ...


1

Yes, I reproduced this behaviour with a simple KML generated using umap. The tool (http://bdferris.github.io/kml-to-gtfs-shapes/) will only convert polylines, as it states in the first sentence of the website: This page provides a simple tool to generate a GTFS shapes.txt file from polyline entries in a KML file. (emphasis mine). Polygons dont work ...


0

I'm facing a similar problem. Layer in ArcGIS 10.3 symbolised so that one numeric variable determines point colour and another determines point size. When exported using Layer to KML tool, the resulting KMZ file in Google Earth looks extremely pixelated - although all five colour bins are preserved, points look more like squares than circles. The solution ...


0

The additional information in the kml file that you wish to use and you refer to as "metadata", could be in the KML jargon: Styles and Stylemaps ExtendedData Custom information in the Description field of a Placemark, usually in the form of html tables Since each kml file is an ASCII file, it can be processed via a text-processing script. According to ...


1

Step 1: Make a Selection of the specific sub-polygon Step 2: Save your selection as a separate feature, but make sure to choose GeoJSON as your file save type


1

Solution for ArcGis (you will need the 3D analyst extension). 1) Load the .asc file in ArcMap. 2) In the Arctoolbox - > Conversion Tool > From KML to Layer (to transform the KML in a file suitable for ArcGis). The new file automatically loads in ArcMap 3) Right click on your converted road and select "Convert feature to graphics" 4) Select the created ...


1

Still not aware of any Arc tool that does this satisfactorily, but I posted a script here: Exporting 3GB ArcGIS Raster to KML without losing resolution?


2

In the search box in ArcMap type, "To KML"; there are two tools. Layer to KML: "This tool converts a feature or raster layer into a KML file containing a translation of Esri geometries and symbology. This file is compressed using ZIP compression, has a .kmz extension, and can be read by any KML client including ArcGIS Explorer, ArcGlobe, and Google Earth." ...


0

It seems that you are having a problem finding the tool. If you us the search tool and just type in layer to kml and the option will appear. Then just follow the steps that the tool gives you.


2

As Midavalo said, you should see Conversion tools in your Toolbox. In there, open the To KML Toolset. You want Layer to KML. Follow the instructions. If you're not seeing any of the toolboxes, I think there may be something wrong with your installation and I recommend re-installing ArcGIS.


2

If you run print(leyte); and open the Console, you'll see the FeatureCollection is trying to draw the polygon with geo_column: ISO, which is clearly not your KML geometry column from the Fusion table. I was able to display the polygon instead just by specifying the correct geometry column, which in this case is called geometry: var leyte = ...


0

I could be a little off-track here but to my knowledge it isn't possible to define an icon this way using glyphicons as the ol.style.icon method is for images. Essentially you're trying to use an icon font which needs a text character (subsequently styled by css). Here's an example that I got working but have shelved for now as I couldn't find a way to allow ...


0

@M. See the kml code for one little polygon. There are thousands that make up the surface shown in the other two photos. The easiest way to ensure other syntax is correct is to simply create a new polygon shape in Google earth, save the polygon as a kml somewhere on ur computer and then replace the coordinate content with your coordinates. Hope this ...


2

As you've noticed Google Earth doesn't tessellate polygons. This means that you will need to tessellate your polygon on your own. You could use something like Triangle to do this: http://www.cs.cmu.edu/~quake/triangle.html Here is a list of libraries which will allow you to do this. Some of them might or might not have a program to do this: ...


2

From the Google Developers help for Keyhole Markup Language it is clear that Google Earth will only use one KML file from a KMZ no matter how many you put into the folder you zip up to create it: Include only one .kml file. (When Google Earth opens a KMZ file, it scans the file, looking for the first .kml file in this list. It ignores all subsequent ...


2

Download administrative boundaries of the spain and portugal from in .shp format from http://www.gadm.org/ you can import the shapefiles into QGIS or another software the filter with query builder to isolate the regions you are interested in QGIS you can install openlayer plugin from the vectors tab select- openstreetmap then select download data points, ...


0

I'd have to check older versions, but in QGIS 2.14.0 KML docs are added as a vector layer via Layer->Add Layer->Add Vector Layer... Specify the source type as "File" and the Source Dataset as the KML file you want to add.


3

The best way to get boundaries of countries, provinces and regions is to use the OSM Boundaries application: https://osm.wno-edv-service.de/boundaries/ Extracting boundaries from generic tools like Overpass Turbo is not always easy, as the boundaries may contain errors and are likely complex multipolygons consisting of many parts. The OSM Boundaries ...


1

You could download data directly from Openstreetmap as .osm file, and convert it in QGIS as .kml, since QGIS supports export data as .kml. Alternatively, you could download data from Geofabrik (also openstreeet map data, but country by country, as .gbd/mdb, and in ArcMap, export it as .kml. Also, I would suggest you to use, if you have, shapefiles od Spain ...


2

The easiest way to get OpenStreetMap extracts would probably be through Mapzen's Metro Extracts tool here I would suggest exporting it in GeoJSON, then using a tool like ogr2gre (there's an online version here) to convert it to KML. You may also be interested in looking at Overpass Turbo for exporting data from OpenStreetMap.


-2

try this to use readkml2 in Tbn2cad, Available at autodesk exchange apps : https://apps.autodesk.com/ACD/pt/Detail/Index?id=525570879147558726&appLang=pt&os=Win32_64


0

First, Geoserver style (SLD) and data (KML) are totaly different. Import the KML file in Geoserver and later, create SLD file in the style editor or create style within the viewer (like Mapfishapp) and next, save the .sld file to get the sld easily without write within XML (more difficult to realize classification or other specific style when some system ...


0

Below is the answer to my problem. hope it helps someone def findCountryByBoundingBoxOffline(coords): log = logging.getLogger(__name__) bb = getBoundingBox(coords) path = 'borders' file = os.path.join(os.path.dirname(__file__),path, 'World_Country_Borders_KML.kml') #SpatialRef = osr.SpatialReference() ...


0

I ran my KML through an XML validator, and it brought to my attention an extra closing tag somewhere. I fixed my program and now it uploads. Basically, the answer was: My program was broken. My apologies. Thank you all for your help.


0

I couldn't find a library, but I coded up a solution that fit my requirements to handle polygons only. The code is provided below for anyone else who might find it useful. ConvertGeoJsonToKml generates complete KML and ConvertGeoJsonToKmlGeometryOnly generates a cut down KML output suitable for use in Google Fusion Tables. using ArcGIS.ServiceModel.Common; ...



Top 50 recent answers are included