I'm trying to display KML polygons of all Canadian provinces and territories on Google Fusion Tables for use in an interactive map I'm making. However, when I upload the KML file containing the polygons, Nunavut appears as incomplete (missing pieces of the polygon on many islands, large gap on mainland border with Northwest Territories). As far as I can tell this is not the case with any of the other 13 regions. It is especially strange because when I open the same KML file in QGIS, all regions appear as complete.
You can view the map here: https://www.google.com/fusiontables/data?docid=1KaUE7sZWdA2PtsOV2tYHQ_qCaQA0kTGuERwfZTd_#map:id=3.
At first I thought that since Nunavut is in the bottom row of my table, the table may have just reached a limit and Fusion Tables just stopped loading it there. So, I went back to QGIS, isolated Nunavut, and simplified the geometries (which, as I understand, cuts down the number of lat/long points contained in the file). Then I uploaded that Nunavut file to my fusion tables and found that the same problem occurred. You can view that map here: https://www.google.com/fusiontables/DataSource?docid=1s-aHA-rOeW8TfsOI4Ef-3rFJ0fnn_SjjIG-CDed8#map:id=3.
Even weirder, when I use other files from StatCan (all the shp files I've downloaded/converted into KML have been from here the Canadian government's statcan website), such as Census Divisions or Census Subdivisions, Nunavut always appears incomplete (and is the only province to do so).
I've tried making the conversions both in QGIS and using ogr2ogr to no avail. The Nunavut polygon always looks the same.
Any help is appreciated. Thanks in advance!
-A
Related
Could anyone gimme some help on how to create a script that would resize all my texts in a file?
I create a lot of menus for restaurants etc, sometimes I come to the conclusion it would be better if every text were 15% smaller, for e.g., but I have hundreds of different layers, with different hierarchies (categories name, products, options, etc). Free transform would solve but then every text would move - and my main reason for finding how to proportionally resize everything together is to keep every element exactly where they are.
I don't have any special requirements concerning text boxes nor anything like that, I'd just like to resize fonts and keep everything in place.
I have a large dataset of points and to stop from showing them all at the same time i'm using nested regions. These regions have network links in them to a server which generates kml files of points and more network links. I'll show x points at the outermost region. That region is made up of smaller regions each showing x points etc. I don't want to show each point more than once. Each point is eligible under many different regions. How can i determine if i've already shown a point?
Ideas:
Use a deterministic algorithm to pick out the points for a level so each region can reverse calculate what points would already have been selected. Problem is that as soon as a point gets added to the database, the algorithm is no longer going to work as the parameters have changed. Also sounds sloooow.
store in the db upon population what region a point should be shown at based on some algorithm. Problem is have to decide where to put a point every time you add one. (not that bad initially assign regions for all points though)
Edit: Or instead of using accumulative regions i could set the maximum LOD for each region.
Con is lots of points could be loaded multiple times. Pro, should be pretty simple / updating DB when already in google earth won't hurt things
Edit Edit: Tried using exclusive regions (https://developers.google.com/kml/documentation/images/LodRange3.gif) Ran into some problems. Namely, if you set there is slight overlap where one region ends (max LOD) and another starts (min LOD) could make it so there's a gap, but it will never be perfect. Also this is okay if you start fully zoomed out so the outermost region is 'active', then as you zoom in somewhere the regions will become active. Problem is if you start zoomed in, then your your outer region is never loaded, so it never loads any of it's subregions and the placemarks won't be displayed. Generating all the possible regions from the start (just not displaying them) is not an option as there would be millions of files
I've searched the various forums and can't find this question asked. If it has, please point me to it.
I'm generating a .KML file with lots of point data in a 400 mile area. When the file is opened, points labels are shown which makes it very busy.
What I'd like is for the file to open with only the points and no labels. Then when the users zooms in to let's say 20 miles, the labels are shown.
I have control over the generation of the KML file, so I can add any additional "parameters" that I need to accomplish this effect.
I'd appreciate someone pointing me to the best method to do this.
Thanks,
MEG
Add each of your points twice to your KML file and place them in different Regions. In the outer region, you can hide the labels via this technique.
I am working on a GE local bike mapping project, and I am using placemarks to create labels with linked descriptions for the roads/trails on the map. While it is nice for the user to click a placemark/label on the map for a description; as the map has grown, the labels can also create visual clutter. The placemarks for the label/descriptions are currently stored with the lineStrings in folders for each road.
It would be nice to be able to turn all of the labels off or on without opening each of the separate road folders to de/select each one. The names of most of the roads are also available on the underlying Google Earth hybrid layer, so the labels and descriptions are helpful but not absolutely necessary.
Download https://sites.google.com/site/tuobikes/kml/hullcrabtree.kmz for an example.
Is there any way to define a set of placemarks as a subtype in order to turn them all on or off as a group? For example, placemark type=label or placemark type=photo... This seems like useful functionality, but I don't see it in the kml reference
Is storing the placemarks for the labels/descriptions together in a folder separate from the lineStrings for the roads the only way to solve the problem?
I don't know of any way other than a Folder to turn on/off a group of related placemarks.
That said, consider using one or more KML Regions to reduce clutter:
"Regions are a powerful KML feature that allows you to add very large datasets to Google Earth without sacrificing performance. Data is loaded and drawn only when it falls within the user's view and occupies a certain portion of the screen. Using Regions, you can supply separate levels of detail for the data, so that fine details are loaded only when the data fills a portion of the screen that is large enough for the details to be visible."
I'm trying to generate a KML file to display a set of features scattered around the UK. I would like the features to be grouped together at higher zoom levels, ideally displaying as an icon with a count of the number of features, so that users can see clusters of features easily.
Essentially I'm trying to do something along these lines, but in Google Earth, not Maps.
Can anyone point me in the right direction. I'm a bit of a newbie with KML :-)
Cheers,
RB.
ANSWERS :
My own research suggests I can do what I want using Regions to define bounding boxes for certain features.
It has also been suggested I should do this using network links, which I'm going to investigate as I think it's a better match for other reasons too.
Is this a standalone KML file? Or the KML returned as data for a network link?
In the first case I'm not sure this is even possible. I have seen layer transparency change with "camera altitude", so perhaps something like this is also possible on features? Then you could add both the single features and the groups features into the same KML file and make them visible based on "distance to camera"? Could be a new KML feature I missed, but you'd have the check the KML specification.
In the second case, you just return KML that matches the given network link viewport information. Based on the bounding box you get, you can subdivide that box into a grid and cluster per box. If you have one feature in a box, return the feature. If you have more than one in a box, return just a "grouped feature" for that box. The clustering will then automatically change when the user moves around in Google Earth: after each camera change your network link URL is called again and you again do feature selection and clustering with the given bounding box viewport. This makes your clustering dynamic.
Does this help?