Anyway, I was wondering if anyone could help... I have used the old version in the past, but wanted to play with the new version...
https://github.com/mholling/nswtopo
I believe I have the prerequisites installed:
- Code: Select all
ruby --version
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x64-mingw32]
- Code: Select all
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
- Code: Select all
gdalinfo --version
GDAL 3.0.4, released 2020/01/28
I've installed nswtopo and nswtopo-layers using gem:
- Code: Select all
nswtopo -v
2.0.0
I can't use a bounds.kml file. I think this is because I made it using GE (since it mentions pushpin):
- Code: Select all
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"]]]>
I could successfully create a map by defining coordinates instead using --coords... but then I can't even add the nsw/topographic map layer
- Code: Select all
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
- Code: Select all
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)
Any help is very welcome! Thanks