Diskussion:WorldFileTool: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
Zeile 20: Zeile 20:
 
# Start '''WorldFileTool'''
 
# Start '''WorldFileTool'''
 
## Choose "Open KML..." (which includes already overlay title, image name, bbox)
 
## Choose "Open KML..." (which includes already overlay title, image name, bbox)
## (optional) or 1. open image file (e.g. jpg), take worldfile (e.g .jpw)
+
## or 1. open image file (e.g. jpg), take worldfile (e.g .jpw)
 
## adds metadata in GUI (if needed):  
 
## adds metadata in GUI (if needed):  
 
### floor (-99..99, default= 0)  
 
### floor (-99..99, default= 0)  
Zeile 28: Zeile 28:
 
# using '''WorldFileTool''' do either...  
 
# using '''WorldFileTool''' do either...  
 
## "Save KML" again (note: rotate image to north if needed, see below)
 
## "Save KML" again (note: rotate image to north if needed, see below)
## (optional) Export world file  
+
## Export world file  
 
## (optional) Generate 'background map' (includes KML and image) (internet access required).
 
## (optional) Generate 'background map' (includes KML and image) (internet access required).
 
# Use georeferenced image in your GIS viewer (e.g. IndoorWPS), map server or GIS.
 
# Use georeferenced image in your GIS viewer (e.g. IndoorWPS), map server or GIS.

Version vom 9. Mai 2008, 19:47 Uhr

Enhancements...

  • DONE, Buttons lassen (keine Toolbar), kein "Title"-Feld.
  • DONE, Alle Menu items und Buttons "Import " und "Export " mit "..."
  • Flag: Set backround color to white (jpg, default: off) nach Rotieren
  • Bei Änderungen "Data has changed. Do you really want to quit?"
  • DONE, Vor speichern einer gleichnamigen Datei, warnen: "File already exists. Do you wan to overwrite it?".
  • DONE, Bei Pull down menu "Map Type" fehlt "others".
  • DONE, Es heisst "World File", bzw. "World file".
  • kml: tags case sensitive
  • kml parser: case sensitive readin

Später:

  • In Swing umschreiben - gute Übung zum Vergleich.

Workflow

  1. Get image to be referenced about a region on earth; e.g. a floor plan from a building ('building map').
  2. Start Google Earth, create "New overlay..." and georeference image.
  3. In Google Earth export overlay as KML (not KMZ) "Save As..." (WICHTIG: Speichern als UTF-8!).
  4. Start WorldFileTool
    1. Choose "Open KML..." (which includes already overlay title, image name, bbox)
    2. or 1. open image file (e.g. jpg), take worldfile (e.g .jpw)
    3. adds metadata in GUI (if needed):
      1. floor (-99..99, default= 0)
      2. priority (1..100 i.e. 1= highest, 0=unknown, no default!)
      3. map type '<background> (2=Others, 1=Landkarte, 0=Gebäudeplan, default= 0)
      4. name (String, falls nicht vorhanden (Worldfile) default "Karte/Plan ohne Namen")
  5. using WorldFileTool do either...
    1. "Save KML" again (note: rotate image to north if needed, see below)
    2. Export world file
    3. (optional) Generate 'background map' (includes KML and image) (internet access required).
  6. Use georeferenced image in your GIS viewer (e.g. IndoorWPS), map server or GIS.

There exist alternatives to georeference an image: See GISpunkt Wiki (german) and freegeographytools.com.

Specifications

Floor: Stock. ACHTUNG:

  • Erdgeschoss => first floor (en_GB: ground floor)
  • 1. Stock => 2nd floor (US)

KML:

  • Examples to test load/import (KML without metadata, image):
    • http:files/amklusbach.zip
  • Building map example to test export (KML, image):
    • http:files/gebaeude.zip
  • Background map example to test Google Maps export (KML, image):
    • http:files/background.zip
  • KML with priority
    • (?upload)

Input with "unwanted" rotation parameter; image needs to be rotated to 'north', so that <rotation>-49.84368795876157</rotation> can be left out (= <rotation>0</rotation>):

 <?xml version="1.0" encoding="UTF-8"?>
 <kml xmlns="http://earth.google.com/kml/2.2">
 <GroundOverlay>
   <name>HSR-Gebäude 6 1. Stock</name>
   <Icon>
     <href>G6-2.png</href>
     <viewBoundScale>0.75</viewBoundScale>
   </Icon>
   <LatLonBox>
     <north>47.22384390486059</north>
     <south>47.22345122640866</south>
     <east>8.816304349533887</east>
     <west>8.815489285344636</west>
     <rotation>-49.84368795876157</rotation>
   </LatLonBox>
 </GroundOverlay>
 </kml>

Methoden

 /* Assumes a world file of a north up image, unprojected and in
    WGS 84, defined with following affine transform parameters
 */
 Point getlat2lon2(Image img, File worldfile)
 etc.