Sterling GIS/SI: DB Structure: Maps

Lately, there was a discussion about “Bulk download of SI Maps” on LinkedIn. I shared my experience – working on a migration project from GIS to SI we needed to download about 500+ maps, compile them with new MapEditor and upload them back. It would’ve taken a lot of time doing it manually, so I decided to get the maps from DB, compile them with MapEditor command line and then upload them into the new system.

Of course, maps should be stored in some kind of CVS – SVN, Git, etc. But we didn’t have this option – all the maps were on the GIS server.

I wrote a simple application on Java – it connected to Oracle DB, downloaded maps (see my SQL below), unzip them and then another application compiled the maps and ran unit tests (it’s a different story). Finally, another application uploaded compiled maps into the new system (now I know we could’ve used native uploadMap.sh or upload.sh script, but back then I didn’t know about it).

So, here is an SQL to get the map in as a blob (Oracle)

select m.*, dt.DATA_OBJECT from map_versions mv, map m, DATA_TABLE dt 
where 
  mv.map_name like '{here your map name, without extension}' 
  and m.map_name = mv.map_name 
  and m.map_version = mv.default_version 
  and m.UNCOMPILED_MAP = dt.data_id

so, there are two main tables – Map and Map_Versions. Maps and Txos are stored in DATA_TABLE.

Gennady Kim