Fri 14 Aug, 2020 2:17 pm
ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
identify -version
Version: ImageMagick 7.0.10-27 Q16 x64 2020-08-10 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 192628806
Features: Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib
gdalinfo --version
GDAL 3.0.4, released 2020/01/28
nswtopo -v
2.0.0
nswtopo init -b bounds.kml map.tgz
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:48: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:18: warning: The called method `init' is defined here
nswtopo: [BUG] Unexpected node test: <:predicate>: <[[:eq, [:attribute, :qname, "", "id"], [:literal, "m_ylw-pushpin"]]]>
nswtopo init --coords 150.0,-32.5,150.1,-32.6 map.tgz
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:48: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:18: warning: The called method `init' is defined here
scale: 1:25000
dimensions: 375mm × 443mm
extent: 9.4km × 11.1km
area: 104.2km²
rotation: 0.0°
nswtopo: map saved
nswtopo add map.tgz nsw/topographic
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:129: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:177: warning: The called method `add' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/feature.rb:16: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/feature.rb:16: warning: The called method is defined here
nsw.topographic.plantation-horticulture: retrieving featuresC:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server/connection.rb:44: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server/connection.rb:20: warning: The called method `get' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server.rb:85: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:116: warning: The called method `bounding_box' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server.rb:89: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server/connection.rb:43: warning: The called method `get_json' is defined here
nsw.topographic.plantation-horticulture: retrieved 0 of 3 featuresC:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/vector.rb:10: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:116: warning: The called method `bounding_box' is defined here
Traceback (most recent call last):
28: from C:/Ruby27-x64/bin/nswtopo:23:in `<main>'
27: from C:/Ruby27-x64/bin/nswtopo:23:in `load'
26: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/bin/nswtopo:409:in `<top (required)>'
25: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:58:in `open'
24: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:58:in `open'
23: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:65:in `block in open'
22: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/package/tar_reader.rb:29:in `new'
21: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:66:in `block (2 levels) in open'
20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:66:in `tap'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/bin/nswtopo:418:in `block in <top (required)>'
18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:123:in `add'
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:123:in `tap'
16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:129:in `block in add'
15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:185:in `add'
14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:185:in `inject'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:185:in `each'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:188:in `block in add'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/vector.rb:10:in `create'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/collection.rb:82:in `clip!'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/collection.rb:82:in `map!'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/collection.rb:83:in `block in clip!'
7: from C:/Ruby27-x64/lib/ruby/2.7.0/forwardable.rb:235:in `clip'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/multi_polygon.rb:7:in `clip'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/multi_polygon.rb:7:in `inject'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/multi_polygon.rb:7:in `each'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/multi_polygon.rb:9:in `block in clip'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/geometry/vector_sequence.rb:3:in `perps'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/geometry/vector_sequence.rb:3:in `map'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/geometry/vector.rb:69:in `perp': undefined method `-@' for [8883.882506364629, -5412.264536419569]:Array (NoMethodError)
Fri 14 Aug, 2020 7:43 pm
Sat 15 Aug, 2020 11:24 am
Sun 16 Aug, 2020 8:24 pm
Huntsman247 wrote:Not sure about that one but have you tried Mapc2mapc?
It works well on windows and is easy enough to use. License for it is super cheap.
https://www.the-thorns.org.uk/mapping/help/begin.html
Sun 16 Aug, 2020 8:29 pm
michael_p wrote:I'm no expert so here is a guess. Try using Ruby 2.5 instead of 2.7. The script was written for 2.5 and there could be something that is version specific in the Xpath parsing of the KML.
Also, could you post the kml data?
I used yml on Ubuntu to create maps with this script. After a few PEBKAC errors it worked really well.
Michael.
gem update --system 2.5
ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
C:\Users\User1\Desktop>nswtopo add map.tgz nsw/topographic
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:129: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:177: warning: The called method `add' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/feature.rb:16: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/feature.rb:16: warning: The called method is defined here
nsw.topographic.plantation-horticulture: retrieving featuresC:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server/connection.rb:44: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server/connection.rb:20: warning: The called method `get' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server.rb:85: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:116: warning: The called method `bounding_box' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server.rb:89: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/arcgis_server/connection.rb:43: warning: The called method `get_json' is defined here
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/vector.rb:10: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:116: warning: The called method `bounding_box' is defined here
nswtopo: empty layer: nsw.topographic.plantation-horticulture
nswtopo: empty layer: nsw.topographic.urban-areas
nsw.topographic.contours: retrieved 500 of 579 featuresTraceback (most recent call last):
25: from C:/Ruby27-x64/bin/nswtopo:26:in `<main>'
24: from C:/Ruby27-x64/bin/nswtopo:26:in `load'
23: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/bin/nswtopo:409:in `<top (required)>'
22: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:58:in `open'
21: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:58:in `open'
20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:65:in `block in open'
19: from C:/Ruby27-x64/lib/ruby/site_ruby/2.7.0/rubygems/package/tar_reader.rb:28:in `new'
18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:66:in `block (2 levels) in open'
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/archive.rb:66:in `tap'
16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/bin/nswtopo:418:in `block in <top (required)>'
15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:123:in `add'
14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:123:in `tap'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo.rb:129:in `block in add'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:185:in `add'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:185:in `inject'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:185:in `each'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/map.rb:188:in `block in add'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/layer/vector.rb:10:in `create'
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/collection.rb:82:in `clip!'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/collection.rb:82:in `map!'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/collection.rb:83:in `block in clip!'
4: from C:/Ruby27-x64/lib/ruby/2.7.0/forwardable.rb:235:in `clip'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/gis/geojson/multi_line_string.rb:7:in `clip'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/geometry/vector_sequence.rb:3:in `perps'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/geometry/vector_sequence.rb:3:in `map'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/nswtopo-2.0.0/lib/nswtopo/geometry/vector.rb:69:in `perp': undefined method `-@' for [4721.235002887568, -5569.8238747219075]:Array (NoMethodError)
Sun 16 Aug, 2020 8:30 pm
felixthecat wrote:I tried the following:
- Code:
gem update --system 2.5
- Code:
ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
Sun 16 Aug, 2020 9:25 pm
michael_p wrote:I'm no expert so here is a guess. Try using Ruby 2.5 instead of 2.7. The script was written for 2.5 and there could be something that is version specific in the Xpath parsing of the KML.
Also, could you post the kml data?
I used yml on Ubuntu to create maps with this script. After a few PEBKAC errors it worked really well.
Michael.
ruby --version
ruby 2.5.8p224 (2020-03-31 revision 67882) [x64-mingw32]
Mon 17 Aug, 2020 10:23 am
© Bushwalk Australia and contributors 2007-2013.