Skip to content

jonasstein/scanaerial

Repository files navigation

scanaerial

  • Scan for areas of similar colour on aerial pictures like OCR for text.
  • recognition works well with lakes, however it will not produce good results with wood in near future.

Features/Changelog

3.0.0 2023-04-02

  • Python 3 migration thanks to taranarmo
  • Code clean up thanks to taranarmo

2.1-beta-1

  • Bing support merged in. Thanks to Cybjit and IrlJidel
  • Improved TMS support ({-y} and {switch:} options added)
  • Timeout check replaced by size limit feature: now it is possible to trace rivers
  • Tags settings moved to configuration file
  • Fixed bugs in Douglas-Peucker algorithm
  • Detection of empty tiles added

2.0-beta.1

  • TMS support added, new timeout check. Thanks to Vort

1.0.3

  • malenki et al. reported that latlon.org does not work at the moment/anymore (?) geoposer.com is another bing WMS server, but somone has to figure out how to use it with scanaerial. Till then it is possible to use landsat with wms_server_url = http://irs.gis-lab.info/?layers=landsat&

1.0.2

  • added tag source:zoomlevel. You see sometimes very different details in different zoomlevels.

1.0.1

  • inner and outer Multipolygon work

1.0.0

  • TMS Zoomlevel of JOSM is used for the downloaded WMS Tiles
  • scanaerial works with Ext_tools Plugin

Requirements

  • JOSM
  • Python. You can run library_check.py to find out if a library is missing
  • Ext_tools plug-in for JOSM. {TZoom} is part of Ext_tools since Ext_tools 25274
  • Of course you need the scanaerial files too. You will find the latest releases on https://github.com/jonasstein/scanaerial/archives/master Copy them to JOSM/plugins/scanaerial for example.

Setup

  • unzip the contents of the downloaded archive to the JOSM plugin directory Linux users put it to: ~/.josm/plugins/ext_tools/scanaerial
  • start JOSM, press F12 and go to Ext_tools configuration
  • use this cmdline:/home/<username>/.josm/plugins/ext_tools/scanaerial/scanaerial.py {lat} {lon} {TZoom} It will create a new menu item in JOSM. (NB: Syntax may change soon) Due to a bug in Ext_tools you can not write “~” instead of “home”
  • You can provide configuration file as after TZoom argument, if not provided scanaerial.cfg will be used
  • For best result you may finetune the values in config file
keyfunction
fixedzoomleveluse this zoomlevel, if Ext_tools did not tell via TZoom
server_apiaccess method of map server: wms, tms or bing
server_namename of the map server (only for the tag string)
server_urlhalf-link for WMS, JOSM-like address for TMS
empty_tile_bytessize of empty tile (in bytes) for current map server
empty_tile_checksumchecksum of empty tile file (algorithm: CRC32)
projectionprojection that is used on the map server
tile_sizex,-yleave it to 256 unless you know what you do
douglas_peucker_epsilonmaximum roughness for smoothening the line
deactivate_simplifyingdeactivate Douglas-Peucker algorithm (only for debugging)
colour_strcolour sensitivity (depends on contrast of images)
maxfilter_settingmedian filter size (noise reduction strength)
size_limitmaximum size of produced object

Roadmap

  • collect recipies for better algorithms
  • try to exclude douglas-peucker from scanaerial. josm can do that.
  • try different algorithms in forks and compare them.
  • try to access cached wms tiles from josm
  • rewrite in c(++) and/or java
  • find betatester

Troubleshooting

  • if anything fails have a look on the error console. Scanaerial is very verbous.

Found a bug?

Links

Have fun!