Display spatial data in Android

I have a spatial table from which I want to display my objects on a canvas in Android. This is in the SpatiaLite database.

I can get the object data in SVG format and create a map from it, but it is not very efficient. The source data of the object is stored in blob format.

My question is how GIS systems display their data. I would like to match objects and be able to touch them to pull out their attribute information.

This is a very simple question with a huge answer. But I'm just looking for a place to start.

I am not going to create a GIS system, I just create some similar functionality.

Any information would be greatly appreciated.

+6
source share
1 answer

I found that there are several options besides svg:

Request the data and analyze it in the JTS geometry object, then the object can then be processed through JTS in coordinate arrays, if necessary. JTS-1.8.jar is the latest current library.

using this for parsing: geometry geometry = new WKBReader (). read (stmt.column_bytes (2));

Instead of using Canvas, OpenGL 1 or 2 seems like the ability to flexibly create highly customizable maps. To use this, all geometries must be converted to floating point arrays, and then floating point buffers, in OpenGL there are many Android OpenGL tutorials and also Android OpenGL started are two very good ones.

Habib: A good place to run for spatial and android is this example: spatialite-android

To select geometry objects on a map with OpenGL, you must select a mixture of selecting a buffer or region around the clicked point, changing the color of the object that you click on, and creating metadata on the object that can be displayed. It may be a little broad, but I still have no idea that it is theoretical.

+1
source

Source: https://habr.com/ru/post/924695/


All Articles