Shp layer to Fusion Table - android

I need to store a .shp file (vector data file) in Fusion table and then "get" him from the fusion table and use it as a layer/overlay on my MapView in android (using google map Api)
is it possible ?
a sample of how to do it will be helpful...
Thanks in advance ! Tom.

I use shpescape.com to convert a shapefile to Fusion Tables, super useful. Getting it in a MapView is a bit trickier, because there is no "official" way to do it in the SDK. You may find some answers here and here.

The url that Gady P shared works, but here are some alternative options:
You need to get your shapefile into KML format. You can either use the Layer to KML tool in ArcGIS. It can be found in Toolboxes > System Toolboxes > Conversion Tools > From KML > KML to Layer.
You can also use GDAL/ogr2ogr to convert the shapefile to KML. I wrote a tutorial on doing this at the GISCollective website a few months ago...
http://giscollective.org/tutorials/gis-techniques/spatial-data-conversion-using-python/
It should be enough to walk you through how to convert it to KML.
Once you have it converted to KML just go to Google Drive and create your Fusion Table, then upload the KML from your computer.
EDIT: After re-reading my tutorial, it seems I give an example of converting a shapefile to KML, so this should be exactly what you need

Related

Android OpenStreetMap tracker available offline

I'm new at osmdroid and I'm trying to build simple GPS tracking application that must work offline. So first of all I know that osmdroid works with .osm But how to download osm file directly to my android device and more importantly how later I need to use it. I dont understand .osm file is simply just xml with lots of coordinates and other data. So how that .osm file can be transform to a graphical map? I know that is necessary to parse .osm file to get data, but where to download actual graphical map?
osmdroid does not currently present .osm data, mainly due to performance reasons. osmdroid does render raster images that someone can capture into a zip or database and then transfer to device. The problem really is space. It's a big planet and getting raster images can be huge! You'd have to prepare geographic regions into a database then host them somewhere and have your app download them on demand.
osmdroid as a wiki on offline maps here:
https://github.com/osmdroid/osmdroid/wiki/Offline-Map-Tiles
An alternative approach is something like Mapsforge, which can preconvert .osm data into their own binary format, also chunked up by geographic region. Same rules apply, however the file/download sizes are much smaller. Support for osmdroid using Mapsforge is in beta at the moment, however mapsforge can run on it's own and has it's own demo apps and whatnot.
To transform the .osm file into a graphical map, you need something like renderd and a slew of other tools, all on open street maps wiki. Again, you need a boat ton of storage for the planet to convert it into raster images. Then you'd still have to package them somehow and get them on device.
Or you can just use online maps.

Android : Shapefile in Googlemaps

I'm Developing an app with Google Maps. In which i need to show a layer of data from the shape file or imagery.
Do any one has an idea on how to do it, i have no idea how to project the layer over the Google maps in android.
Provide me with some API and sample codes if available else with any other suggestion.
There is no way to render .Shp file directly in Google Maps.
But if you really want to do then export .Shp to .Kml file using some QuantumGIS or ARC GIS and then Make XMLPullParser that can easily parse this .Kml file.
Refer this questions for more information
Does anyone know of a library in Java that can parse ESRI Shapefiles?
Android lib to read or parse shapefile
https://gis.stackexchange.com/questions/48191/how-to-display-esri-shapefile-in-android
https://gist.github.com/kiichi/6119073
With Google Maps Android API utility library you can display KML or GeoJSON data over a Google Maps MapView.
Now you only need to parse your shapefile and convert it to one of the previous mentioned formats.
The shapefile parsing process can be accomplished with one of the libraries mentioned in this question.
The conversion process (java objects to XML or JSON objects) will need to be programmatically handled by you.

How to access Offline Maps in Android

I was given a task where i need to build an offline map i have shape file and a kml file..
I found something about kml where i need to parse the data and overlay the data on the maps.but it should be done from scratch.If there any tutorial Please do help me for kml.
or
IS there any easy way to store the maps offline and use it in android. i see lot of things like tpk,.map etc
please do help i am struck with this from abt a week and dint find any clue how to do it..
tpk is basically doing the map with tile packages concept, whereas the other option involves using sqlite format compact cache. for more details, you can consult arcgis library at
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Welcome_to_the_ArcGIS_Server_10_Help/009300000004000000/
and also this is for OSMdroid library
http://www.haakseth.com/?p=30. hope it will help you

osmdroid sqlite tile source

I want to add a SQLite tile provider to OSMDroid just like RMaps. I went through OSMDroid source code and its tile providers and I found that they are designed to get tiles from File, Archive file and internet.
I am using osmdroid-android 3.0.5.
I don't belive this is possible with the current Osmdroid library. If you want to do it you will have to create your own TileProvider to fit into the framework which should be possible.
I expect that using an archive file for the actual map tiles and a seperate database for your meta data is by far the simplest solution. Putting large amounts of data like the tiles into the database is not recomended.
Have a look at this page. I think this is what you are looking for :o)
I recently implemented a sqlite storage for the tiles of the osmdroid lib, and the only thing missing is the ability to create it with mobac. So I wrote this patch to provide the new output option. Please have a look and commit it if you like it. Let me know if you think I should change something.

How to route on googlemap from csv file?

I want to development an application like this:
There is a csv file containing the coordinates as follow.
30.6674,36.8925
30.6651,36.8926
30.6649,36.8923
...
I want to route the way on google maps api by getting the coordinate information from csv file.
How do I do this, can you give sample link or any suggestion.
Thanks.
loading csv file content in an array:
http://www.webdeveloper.com/forum/showthread.php?t=225845
passing an array of addresses (or coordinates) to the API:
how to use the google maps api with greasemonkey to read a table of addresses and trace the route?
--- EDITED [28/10/2011] ---
here: Loading an array from a .txt file? (Android)
and here: https://stackoverflow.com/questions/5668507/trying-to-load-a-list-of-overlay-positions-from-file

Categories

Resources