nswtopo.rb:43:in `deep_merge': undefined method `inject' for false:FalseClass (NoMethodError)
from nswtopo.rb:1845:in `each'
from nswtopo.rb:1845:in `inject'
from nswtopo.rb:1845:in `run'
from nswtopo.rb:2272:in `<main>'
Natvander wrote:Hi
My first post so please go easy on me.
I read this thread with great interest as I desparately want/need to create my own vector topo maps. I'm pretty sure I've followed all the directions but I can't get the script to work. Running the command prompt from OSGeo4W, ruby isn't recognised and running the command prompt normally won't find the gdal info.
While I'm pretty computer savvy, my scripting knowledge is pretty basic.
Cheers
Nathan
Ent wrote:Confirming is this thread about vector or raster mapping. Ie does it create vector maps for a Garmin? Else there is always OSM.
andrewp wrote:Ent wrote:Confirming is this thread about vector or raster mapping. Ie does it create vector maps for a Garmin? Else there is always OSM.
The script produces svg format, which is a vector graphics format, but AFAIK the only way you could load it up to a Garmin is as a custom map. To do that you would have to render it as a rastor and georeference it as a kmz file.
Cheers
Allchin09 wrote:mholling - When I execute the command "ruby nswtopo.rb" I get a response of:nswtopo.rb:43:in `deep_merge': undefined method `inject' for false:FalseClass (NoMethodError)
from nswtopo.rb:1845:in `each'
from nswtopo.rb:1845:in `inject'
from nswtopo.rb:1845:in `run'
from nswtopo.rb:2272:in `<main>'
Any thoughts?
Allchin09 wrote:Allchin09 wrote:mholling - When I execute the command "ruby nswtopo.rb" I get a response of:nswtopo.rb:43:in `deep_merge': undefined method `inject' for false:FalseClass (NoMethodError)
from nswtopo.rb:1845:in `each'
from nswtopo.rb:1845:in `inject'
from nswtopo.rb:1845:in `run'
from nswtopo.rb:2272:in `<main>'
Any thoughts?
I'm still having this issue. Can anyone help me!?
Exception in thread "main" java.security.AccessControlException: access denied (
"java.util.PropertyPermission" "java.security.policy" "write")
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:372)
at java.security.AccessController.checkPermission(AccessController.java:
559)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.System.setProperty(System.java:783)
at org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityMana
ger(Unknown Source)
at org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Unk
nown Source)
at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source)
at org.apache.batik.apps.rasterizer.Main.main(Unknown Source)
mogrify.exe: unable to open image `C:/OSGEO4~1/temp/d20150508-9952-12nddyr/map.3
00.png': No such file or directory @ error/blob.c/OpenBlob/2692.
mogrify.exe: unable to open file `C:/OSGEO4~1/temp/d20150508-9952-12nddyr/map.30
0.png' @ error/png.c/ReadPNGImage/3912.
Generating map.png
C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1391:in `initialize': No such file or
directory @ rb_sysopen - C:/OSGEO4~1/temp/d20150508-9952-12nddyr/map.300.png (Er
rno::ENOENT)
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1391:in `open'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1391:in `copy_file'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:485:in `copy_file'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:402:in `block in cp'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1570:in `block in fu_each
_src_dest'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1586:in `fu_each_src_dest
0'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:1568:in `fu_each_src_dest
'
from C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:401:in `cp'
from nswtopo.rb:3110:in `block (3 levels) in run'
from nswtopo.rb:3104:in `each'
from nswtopo.rb:3104:in `block (2 levels) in run'
from nswtopo.rb:3097:in `each'
from nswtopo.rb:3097:in `block in run'
from nswtopo.rb:67:in `block in mktmppath'
from C:/Ruby22-x64/lib/ruby/2.2.0/tmpdir.rb:88:in `mktmpdir'
from nswtopo.rb:66:in `mktmppath'
from nswtopo.rb:3094:in `run'
from nswtopo.rb:3145:in `<main>'
felixthecat wrote:
I was just helping someone else fix this. They had this error because they had a blank config file.
What's in your config file? If its blank add the following:
name: output
Also add some layers if you don't have any:
include:
- nsw/reference-topo-current
- grid
Cheers.
name: output
zone: 56
easting: 246786
northing: 6260113
size: 297 x 420
scale: 25000
contour-interval: 10
include:
- nsw/vegetation-2008-v2
- nsw/topographic
- relief
- grid
rasterise: C:/nswtopo-master/phantomjs-2.0.0-windows/bin/phantomjs.exe
formats:
- kmz
nsw.vegetation-2008-v2:
path: /nswtopo-
master/sources/nsw/NSWInterimNativeVegetationExtentV2_2008/Data/nswint
ext08/hdr.adf
colour:
woody: light green
non-woody: white
nswtopo.rb:2660:in ``': No such file or directory - 7z a -tzip -r "C:/Users/Owner/AppData/Local/Temp/d20150508-7340-1tpkhvy/output.kmz" * (Errno::ENOENT)
from nswtopo.rb:2660:in `block (2 levels) in build'
from nswtopo.rb:2660:in `chdir'
from nswtopo.rb:2660:in `block in build'
from nswtopo.rb:67:in `block in mktmppath'
from C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
from nswtopo.rb:66:in `mktmppath'
from nswtopo.rb:2555:in `build'
from nswtopo.rb:3118:in `block (3 levels) in run'
from nswtopo.rb:3104:in `each'
from nswtopo.rb:3104:in `block (2 levels) in run'
from nswtopo.rb:3095:in `each'
from nswtopo.rb:3095:in `block in run'
from nswtopo.rb:67:in `block in mktmppath'
from C:/Ruby193/lib/ruby/1.9.1/tmpdir.rb:83:in `mktmpdir'
from nswtopo.rb:66:in `mktmppath'
from nswtopo.rb:3094:in `run'
from nswtopo.rb:3145:in `<main>'
cnschulz wrote:Im having 2 problems with this:
1. I am having java security issues (no write access) for the temp files during the raster creation phase. SVG is created ok.
2. I have downloaded the vegetation v2 dataset but I have no idea where/what to unzip or how to configure it. Ideas welcomed.
nsw.vegetation-2008-v2:
path: /Users/username/Desktop/nswtopo/NSWInterimNativeVegetationExtentV2_2008/Data/nswintext08/hdr.adf
Allchin09 wrote:One thing I can't sort out is outputting to other raster formats. My nswtopo.cfg file is shown below. Any thoughts on what's going wrong?
name: output
zone: 56
easting: 246786
northing: 6260113
size: 297 x 420
scale: 25000
contour-interval: 10
#######################
include:
- nsw/vegetation-2008-v2
- nsw/topographic
- relief
- grid
nsw.vegetation-2008-v2:
path: /nswtopo-master/sources/nsw/NSWInterimNativeVegetationExtentV2_2008/Data/nswintext08/hdr.adf
########################
rasterise: C:/nswtopo-master/phantomjs-2.0.0-windows/bin/phantomjs.exe
########################
formats:
- kmz
felixthecat wrote:Ok, I think there might be a problem with the structure of your config file...
Allchin09 wrote:Unfortunately, that didn't seem to solve the issue. Everything work fine until I name a format. It then asks me to specify a program to use to rasterise, and when I specify that in the .cfg files I get the error messages...
No such file or directory - 7z a -tzip -r "C:/Users/Owner/AppData/Local/Temp/d20150508-7340-1tpkhvy/output.kmz" * (Errno::ENOENT)
(If you want to create KMZ maps, install 7-Zip and add its location, C:\Program Files\7-Zip, to your PATH following these instructions, using a semicolon to separate your addition.)
Return to New South Wales & ACT
Users browsing this forum: Google [Bot] and 13 guests