I'm trying to use writekml in stata to create a kml map that can open in Google earth. I have the exact geographic coordinates of the places I need to map and they're stored under variable headers "latitude" and "longitude." The command I run is:
writekml, filename(xyzmap) plcategory(village_types)
The file is exporting but its showing up blank and and none of the markers are showing in google earth.
Note:
I've created maps using shapefiles but i want the ones in Google maps because of the greater detail
I've been able to manually convert an xls file containing the latitudes and longitudes to kml and then opening it with Google earth so I definitely know the coordinates are fine.
Related
I have downloaded a kml file from https://www.genesys-pgr.org/explore/map but I don't have a tool to support it. How can I convert the xml file to pdf or word file?
Converting a KML file to a PDF is not straightforward and the solution really depends on what you want to do with the PDF file. KML or Keyhole Markup Language is simply a collection of geospatial annotations on a map that can be opened in an application that supports that data format. KML itself is a shareable file format that can be emailed from one user to another to share places on the map.
If you just want to view the KML file recommend you download and install Google Earth Pro, which is freely provided by Google. There are other viewers for KML available.
One way to convert KML to PDF is the following steps:
Open the KML file with Google Earth Pro
Change the view on the map to view you want to save in the PDF file. For example, tilt the map and/or zoom on the map.
Next take a screenshot of the Google Earth map or select save image option in the menu to save the map view as a JPEG image.
Insert that JPEG image into a Word document and/or then save it as a PDF file.
I need to create a map of the United States with some points indicating results on an academic research project.
I need to produce a map for every day of the project in order to send the maps to people who don't have Tableau. I intend to make a slideshow with the maps displaying the change in the map over the two months.
The problem is that this means creating about 60 maps.
My question is: Is there a way to automate this process and automatically produce a jpg file in the map tab of my Tableau worksheet for all days in the data set?
Can you make an animation? You can put your date element in the pages shelf and animate. From there you can create a screen capture of the animation and create a movie. If you want it to be an image, you could turn that movie into an animated gif or extract all the frames (search for ImageMagick for more on this).
Here's an example of an animated map.
http://apandre.wordpress.com/2014/01/12/motion-map-chart/
First off, I apologize if this is a novice question and/or if it has been asked already. I'm new to KML and so far, searching for 'GroundOverlay' and 'zoom' hasn't helped me.
I have created a KMZ file from an ESRI ArcGIS Layer. The KMZ includes a GroundOverlay (which is a PNG image). The KMZ opens and works fine in Google Earth, but now I would like to limit its visibility. My data is for the continental 48 US States and is meant to be viewed as such. So, zooming in to a 500-mile eye alt in Google Earth doesn't do the user any good. Is there a setting for GroundOverlay that turns its visibility off when the user is zoomed in to a specific level in Google Earth?
Thanks!
Making features visible in Google Earth when you're zoomed in/out can be controlled by adding a Region to your GroundOverlay. Same concept works for any KML Feature (i.e., Document, Folder, Placemark, GroundOverlay, NetworkLink, etc.)
You can simply add a Region to your GroundOverlay with maxLodPixels value to make it disappear when you're zoomed in. A more advanced setup could have smaller region-sized image overlays rather than a singe continent-sized overlay where each GroundOverlay has a Region for when when that overlay is visible. The visibility of the Region is defined when the bounds of the region (via LatLonAltBox) with respect to a minimum or maximum pixel size.
Note, however, that Google Earth won't let you create or edit a Region on a GroundOverlay directly so you'll need to add that to your KML outside of Google Earth. This and other limitations in Google Earth are listed here.
To get a feel for pixel sizes on the screen and create appropriate minimum pixel size (minLodPixels) and maximum size (maxLodPixels) you can measure the "screen" pixels dimensions with the KML screen ruler. Click "Raw" link to view raw KML then save locally and launch in Google Earth.
I have created a kml file with Google Earth that creates an overlay using an external image. It works well, and I would like to find a reasonably convenient way of converting the kml so that Google Maps can read it and display it in a similar fashion.
Google Maps cannot process Google Earth coordinates, so I attempted to convert them myself. For instance I replaced the Earth Coordinates:
<gx:LatLonQuad>
<coordinates>
-80.34344837780532,33.1105864538138,0
-80.31934785561177,33.09410014458361,0
-80.30034967982111,33.11373571527255,0
-80.32473786478347,33.13044135685429,0
</coordinates>
</gx:LatLonQuad>
with the equivalent Maps coordinates:
<LatLonBox>
<north>33.13044135685429</north>
<south>33.11373571527255</south>
<east>-80.31934785561177</east>
<west>-80.34344837780532</west>
</LatLonBox>
Unfortunately, the are not exactly "equivalent". The Maps overlay is slightly off and rotated incorrectly.
Here are the images from the two:
Earth Example
Maps Example
I can see why it doesn't work, but I'm at a loss as to another solution. Anyone know of a simple way to convert a Google Earth kml to a Google Maps kml when an image overlay is involved?
Per the KML reference a <LatLonBox> also has a rotation. Not sure if that is supported for Google Maps, but it should address the issue you are having. The <gx:LatLonQuad> allows you do specify a rotated box (which is what you are doing), this is what that specifies:
http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmltest_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/GoogleEarthPolygon.kml
According to the KML reference for Google Maps, LatLonBox is supported, rotation is not:
KML Element Supported in Google Maps?
<LatLonBox> yes
<rotation> no
therefore you need to make your overlay align on north/south east/west boundaries (a non-rotated LatLonBox) to work on Google Maps.
You have a problem with your computed LatLonBox (the small blue box), you want the green box:
http://www.geocodezip.com/v3_GoogleEx_layer-kml_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/GoogleEarthPolygonA.kml
I think the only way to fix this is to take your original image rotate it and save an image aligned on north/south east/west boundaries that fits in the bigger box.
Either that or make a custom overlay that supports rotation somehow.
I'm using Google Earth to display point data as placemarks. The data is on a color-coded scale, and so it's pretty important that they keep their colors (which are set via a series of differently colored icons)
However, Google Earth seems to have a 'feature' whereby it dims some placemarks if they overlap. I can find no reference to this feature, nor any way to avoid it, turn it off, using KML or otherwise.
The question was originally asked here:
https://groups.google.com/a/googleproductforums.com/forum/#!topic/earth/DTl6yGLvPvw
Where there are also screenshots of the problem.
Thanks!