New answers tagged

1

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, ...


1

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.


2

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; ...


0

I found a possible solution with the raster package combined together with the input of the STFDF function which are n spatial locations, m times and n x m observations. This input is computed by the function mySTGrid and then used for the "rasterplot", properly performed in the RasterPlot function: library(raster) # 51, 101, 101 grid dimensions - 1 (time ...


1

Mapbox's togeojson converter handles this very nicely. It flattens the contents of all layers/folders into sibling features. A bonus: unlike the accepted answer using ogr2ogr to extract each layer/folder, togeojson preserves features in the top-level, and not in any directory. Since it's JavaScript, it can run in your browser at ...


2

That script is outdated. You can use the built in functionality of ArcGIS Desktop's ArcToolbox: http://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/kml-to-layer.htm It's in the Conversion Tools toolbox, and then inside From KML.


0

Apparently, when the KML vector layer is used in combination with a Cluster, the location of the fields vary: KML without clustering: popupContent.innerHTML = '<p>' + features[0].get("description") + '</p>'; KML with clustering: popupContent.innerHTML = '<p>' + features[0].get("features")[0].get("description") + '</p>';


0

I hope this sums up the question: Google does not lable polygons but it does lable points. In order to have a label in google earth for the Points you need to fill the column name (of your attribute table in qgis) you want into the NameField in the save as menue from the layer within qgis.


1

Yes, there is a plugin for that.


1

Ok, this turned out to be as simple as text search and replace: <Polygon><outerBoundaryIs><LinearRing> to <LineString> and </Polygon></outerBoundaryIs></LinearRing> to </LineString>


0

The R package plotKML can do this for you. The package will convert sp spatial objects to KML format. From the kml method documentation: library(plotKML) # Plotting a SpatialPointsDataFrame object library(rgdal) data(eberg) eberg <- eberg[runif(nrow(eberg))<.1,] library(sp) library(rgdal) coordinates(eberg) <- ~X+Y proj4string(eberg) <- ...


2

Could you check ArcGIS help, which stated that This warning commonly occurs when the Extent or XYDomain environment settings have been previously set for a specific geographic area and the values were inadvertently used when running another tool.


2

Save AS ... the kml file as a shapefile into a CRS that uses meters as units, like your local UTM zone. Then you can use the $length variable to label the line with the length in the layers units.


0

My solution to the problem would be: Open your kml file with a text editor (notepad for instance) Copy the entire text, and paste it here : http://www.zonums.com/online/kmlArea/ Done!


0

"/Edit 1: Data from GPS sources are usually in wgs1984 by default. Check that first then you can skip the reproject step. Rightclick on the layer in ArcMap and choose "Properties" click tab "Source" and check if the projected coordinate system is WGS 1984." Not directly on the fly, you need to export it to kmz then open it in Google Earth. If this dont work ...


0

To do this there is a Layer To KML tool: 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

To the best of my knowledge there is no code to do this on GeoTools as GeoTools confines itself to reading and writing data formats and handles styling as a separate matter. You could look at (and probably use) the code in GeoServer that handles writing out KML with a style.


0

I contacted support. This is what they told me: Thank you for contacting DeLorme. I apologize but Street Atlas USA does not have any export to KML capabilities. You can export waypoints and tracks to GPX but not KML. So that's that I suppose. I may attempt to turn it into a GPX and then into a KML with some online program or something. We'll ...


2

Currently the extrusion you are setting in Pro that would go towards publishing a feature service in AGOL is not supported in the scene viewer. You can do this in code with the JS API 4.0(currently in beta, final coming soon!). Check out this blog to help you get started: ...


2

The KML Encoder (like most of GeoTools) works with features not geometries so you need to wrap your polygon in a feature, this gives you the opportunity to add some attributes to make your KML more useful too. public static void main(String[] args) throws IOException { File t = new File("test1.kml"); SimpleFeatureTypeBuilder builder = new ...


0

As commented by @KHibma: Try: manually perform the workflow, once the layer looks how you want it, create a LYRX file and save it to disk. Then build your model with Apply Symbology from Layer tool in between the 2 tools. Alternatively look at using a task, while it wont completely automate a 1 -click solution, you can have it launch tools and ...


0

Have you tried using the export to kml tool in mmqgis plugin? This allows you to specify columns for export. From the authors web site: This tool exports features to KML with the capability to explicitly specify fields for the Name and Description that are always displayed in the current (as of this writing) default Google Maps (tm) interface. Multiple ...



Top 50 recent answers are included