I'm using http://www.zonums.com/shp2kml.html to convert a SHP file to a KML for integration into Google Fusion Tables.
I'm able to do this successfully with many shp files, but am having a particular problem with one particular SHP file.
http://www.electionsquebec.qc.ca/documents/zip/shapefile-sections-de-vote-elections-generales-2008.zip
When I create the KML file and open it in Google Earth, the actual boundaries are somewhere in the Pacific Ocean (rather than actually outlining the province of Quebec). The shape is fine, it's just the whole actual shape is shifted to the Pacific Ocean. I'm wondering if it has to do with the UTM..or something with the coordinates. I've tried different zones, different Datum...nothing works. Help?
I used shpescape, it gave me this which looks right to me. you must be doing something wrong with shp2kml.
I'm not familiar w/shp2kml but according to the homepage it can accept Lat/Lng, or UTM based projections. The shapefile in question, however, is in a Lambert equal area projection, which I assume is not supported (check the .prj file to see details).
As noted in the other answer, shpescape.com should work for this use case -- it does transformations with the proj4 library, and this projection is supported.
Related
I am working on a project where Users can interact with a Map via mouse click to see more details of an area. It is Perth Metropolitan Area Map. This Map is generated from PDF using online "PDF to SVG converter".
When I looked at generated SVG code it is so huge can't understand full of it. and did some research to see if i can find any simpler version of the Map, I see there are various options to construct SVG, detailed below.
Shapefiles : Creating maps based on real world data, I thought this is good option to go. but the problem I observed here is we need to depend on GIS tools and open databases where GIS data is available. It is too heavy for our requirement.
Geo JSON / Topo JSON : I see this is simple way to represent Maps in plain, but I could not figure out a way to generate required JSON files. After exploring more on this I understood these technologies are dependent on GIS / Shapefiles.
Inscape : UI editor to draw SVG - It is just generating lot of SVG code again.
After reviewing above all I kind of thinking may be I should learn to write own SVG map.
Can somebody advice whether I am in right direction or Are there any simple approaches to create a Map like this Perth Metropolitan Area Map ?
Thanks in advance.
I have a KML file (NewYork.kml) which has assets listed in co-ordinates (inside LineStrings) in the New York region.
I am trying to pick a random point in New York (For example: 40.739974,-74.009605) and get any assets listed within a 500ft range.
I am working with Java/Google Earth API. Does anyone have any tips on which direction to go?
I'd recommend the geojs library, in particular the geo.Point class.
It has useful methods like distance() that you could use to see if two coordinates are within 500ft of each other.
I am trying to extract my KML file from Google's Fusion Tables into Google Earth. I follow what I think are the necessary steps via KML Network Link instructions. I must be missing something because no matter what I do the data will not show in Google Earth. I have the Fusion file shared as Unlisted, but am I supposed create a public URL as well in order for the points to show in google earth?
Sorry for the basic/beginner question. It's SO basic I can't find a question already addressing the issue.
Thanks in advance.
I can think of two things to check.
1) Your Fusion Table must be "exportable". Edit->Modify Table Info. Make sure the exportable checkbox is selected.
2) Did you rely on geo-coding addresses when creating your table? The lat/long values of geo-coded addresses in Fusion Tables will not be exported in the KML, and addresses might not display in Google Earth.
Eric
I've created a Google map that loads a KML file as an overlay. It is a map of trailheads for say hiking. What I'm trying to figure out now is how to create a search that will allow visitors to search within the KML's data and show the relevant trailhead/s as results on the Google Map. Is this possible? I have a google search that will let them search for an address, but this does NOT search within the KML file's data for a trailhead.
Ideally the visitor could input an address, say 12345 Main st., Chicago, IL, or something and it would display results that are within a specified vicinity, say ten miles, of that address (ie latitude, longitude).
I'm a little lost as to even where to begin.
thanks for your help!
Davis
I don't know how often your kml file updates, but i recommend storing all the kml data in a database as well to make this easier. Maybe every once in a while re-download the kml file and update the database.
Then its as simple as using the haversine formula and searching the database for nearby trails.
What you're describing sounds like a good job for Fusion Tables. Fusion Tables give you a nice way to store and edit the data (even collaboratively). In addition, there are geospatial columns/data fields you can add (aka, a "Location" column that can be address or lat/long coordinates). Put all the trail heads in your fusion table and you can map them. Let people enter an address or lat/long, and you can query the fusion table to show all trail heads within the user specified distance of that point. See the tutorials to get started.
You can use KML search tool to do this. It supports KML KMZ CSV and GPX. You can find the tool here
I want to create visuals along the lines of CNN's "red-state, blue-state" shadings of the states in the U.S. for my project. I'm planning to do something fancier than just shading the state's shape in a color. Are there open source libraries of state shapes/polygons (or - if not open source - others) that I can import into Word, Excel, etc. that I can use to show complicated graphs based on states?
I have Map Point, but haven't been able to figure out how to shade the states in a complex way.
you could try google charts, it looks like http://www.woot.com is doing something similar to what you need
Here is a good example using google maps... I've used code like that before.. perhaps from this exact example.
http://econym.org.uk/gmap/example_states2.htm
EDIT: you might want to consider converting the states.xml into JSON... it'll be smaller (136k of XML right now!) and should load faster in most browsers.
There might be a couple parts to the question you are asking, but to address the first part "Are there open source libraries of state shapes/polygons...", here's a resource to check out:
http://commons.wikimedia.org/wiki/Category:SVG_maps_of_the_United_States
It's a list of various SVG(scalable vector graphics) files which can be imported into a number of applications. Basically a giant xml representation of lines and endpoints. This can be directly converted to XAML, if you're into a more programmatic way of charting(ie, C# w/ Silverlight).
However, to address the second part regarding MS Office, Visio can import SVG files for manipulation as well. I'm unsure what type of graphs you were looking for, but I hope this can assist in some small way on your path to awesomeness ;)