PlugIns? (#2) - Exporting Tiles to a SQLite DB (#511) - Message List
We have an application where we import map tiles that use the tiling model in Google and Bing maps. We are looking for a plugin that would allow our users (mainly military) to build their map database in FalconView and then export selected map sets into a SQLite database with a tiles table in it that has columns of (x, y, z, s, and image. Alternatively we could also build a plugin where we could export directly into our file based format and then simply copy the result up to the portable computers we use with our search and rescue products.
Does anyone know of an existing plugin? Is there an existing FalconView capability to perform this operation? Or is there some guidance someone could provide that would allow us to create our own?
I would suggest starting with the sample attached to the following page: http://www.falconview.org/trac/FalconView/wiki/MapRenderingEngine
The sample demonstrates how to use the rendering engine component in an application. For a tile service you already know the geographic bounds of the tile and the size you want to render that tile to. To do this, you will replace the calls to SetSurfaceDimensions/SetMapType? with a call to SetMapTypeFromGeoBounds?. And instead of drawing to a device context, via DrawMap?, you want to draw to a device independent bitmap so you can save the image into your tile cache. For this, you will replace the DrawMap? call with DrawMapToResizedDIB.GeorgeMenhorn07/06/12 16:25:26 (11 months ago)
OK I am trying the sample and I continue to get "MAP_STATUS_INVALID_MAP_TYPE" invalid on the SetMapType? call. I followed the instructions from "martin5000 03/04/11 06:19:45 (16 months ago)" and changed the m_map_series to "TopoBath??". This did not work either. I still get the mismatched type and the map fails to display. I have the 4.2.1 installation with whatever map it comes with which includes just a world view. Don't know if this is because of the maps.
Assuming I can get past this. What I am looking to do is to create a plugin that allows my users to drag out a window from which they want to extract map tiles. I then need to determine what zoom levels I can show the user for extraction. We typically use 2, 4, 6, 8, 10, 12, 14, 16, 18, 20. Then the algorithm for extraction each tile will work as you defined it above. Anything you can add to help, sample code, etc. would be extremely helpful.pauldivaniii07/10/12 00:05:42 (11 months ago)
Take a look at the error log (%APPDATA%\MissionPlanning?\error_log.txt) which may contain additional information.
An example of a map type that should work would be "TIROS", 16, MAP_SCALE_KILOMETER, "TopoBath?".GeorgeMenhorn07/10/12 09:56:14 (11 months ago)
I have the code displaying the map now but I need to be able to use the SetMapTypeFromGeoBounds?, get some help with setting up the rendering engine to display the maps I have loaded, for example, turn on street maps in the application and other normal mapping activities. We are now planning on using the Rendering engine in our application as a map display alternative and we need more help/documentation as to how to do the following (quoted from the MapRenderEngine? page): Alternativly, the 3rd party application will need to duplicat the functionality of the Map Data Manager for generating coverage, copying map data and adding or deleting Map Data paths.
I have not been able to find documentation on the interfaces for the rendering engine and how to use the model. Can you point me to the actual rendering engine documentation please?pauldivaniii07/17/12 18:08:57 (10 months ago)
There is no formal documentation for the rendering engine. This wiki along with samples probably contain the bulk of the documentation.
Note that you don't need to duplicate the functionality of the Map Data Manager if you are using rendering engine as a display piece. Not sure why that page mentions that.
The key ideas are contained in the map rendering engine sample application. Initialize the rendering engine (Init), set the surface dimensions (SetSurfaceDimensions?), set the map type (SetMapType?), render to a surface (DrawMap?).
After the first map is up, you can integrate it with your user interface for doing things like scaling in / out (ScaleIn/ScaleOut?), panning the map (PanMap?), etc. after any operation that changes the map type you'll redraw the map to your surface with DrawMap?.GeorgeMenhorn07/20/12 18:57:58 (10 months ago)
08/02/12 17:06:13 ddc4 EXCEPTION - Source: display_map - Description: Error opening Tiros frame: C:\Users\Public\Documents\PFPS\tiros3\topobath\4km\TOPOBATH_004K_0301.WLD
using this call:
mask is: SOURCE_VALID | SCALE_VALID | SERIES_VALID | LOCATION_VALID | ROTATION_VALID | ZOOM_VALID | PROJECTION_VALID;
The map file is on the disk in the location it specifies. Does this version of the library work with Windows 7? If so, has something changed with the interface with this version?
The older version of this library that we were using (Falconview 4.0.1) seems to work fine in Windows 7.
Thanks for the help.Steve08/02/12 18:30:18 (10 months ago)