Old scripts not working
Ice Age Mark
Global Mapper UserTrusted User
Hello there Mike,
I have some scripts for loading my local Nexrad radar directly from the NWS ftp site over a custom local background. I haven't used them for some months (since 12.01 ?). For some reason, they won't work now so I re-created them in V13 (b093011), but to no avail. They're so simple, I can't see what could be wrong.
Upon running the script, the file imports, the palette shows up, but GM doesn't seem to find the projection file when loading directly from the website; and so the image is off in "la-la land". I have the necessary .gfw file; and when I copy the image and .gfw to my computer and load it into GM, everything works fine (that's how I got the script). Below is the script, and the resulting metadata when it is run. Has anything changed, or am I missing something simple (more likely)?
The NWS ftp site is: http://radar.weather.gov/ridge/RadarImg/N0R/
The script is:
GLOBAL_MAPPER_SCRIPT VERSION="1.00" FILENAME="C:\Users\MP\Downloads\OTX_N0R_0 for script.gmw"
UNLOAD_ALL
DEFINE_PROJ PROJ_NAME="GEO_WGS84"
Projection GEOGRAPHIC
Datum WGS84
Zunits NO
Units DD
Xshift 0.000000
Yshift 0.000000
Parameters
0 0 0.000 /* longitude of center of projection
END_DEFINE_PROJ
IMPORT FILENAME="http://radar.weather.gov/ridge/RadarImg/N0R/OTX_N0R_0.gif" TYPE="GIF" PROJ_NAME="GEO_WGS84" \
LABEL_FIELD="" SAMPLING_METHOD="NEAREST_NEIGHBOR" AUTO_CONTRAST="NO" CONTRAST_SHARED="YES" \
CONTRAST_MODE="NONE" CLIP_COLLAR="LAT_LON" CLIP_COLLAR_BOUNDS="-121.000000,46.000000,-115.000000,50.000000" \
TEXTURE_MAP="NO"
LOAD_PROJECTION PROJ_NAME="GEO_WGS84"
SET_VIEW GLOBAL_BOUNDS="-125.6125958379,44.3627601314,-112.3915662651,50.6627601314"
The resulting metadata is:
FILENAME=C:\Users\MP\AppData\Local\Temp\GlobalMapper\downloads\radar_weather_gov_ridge_RadarImg_N0R_OTX_N0R_0.gif
DESCRIPTION=radar_weather_gov_ridge_RadarImg_N0R_OTX_N0R_0.gif
UPPER LEFT X=0.0000000000
UPPER LEFT Y=550.0000000000
LOWER RIGHT X=600.0000000000
LOWER RIGHT Y=0.0000000000
WEST LONGITUDE=0° 00' 0.0000" E
NORTH LATITUDE=550° 00' 0.0000" N
EAST LONGITUDE=600° 00' 0.0000" E
SOUTH LATITUDE=0° 00' 0.0000" N
PROJ_DESC=Geographic (Latitude/Longitude) / WGS84 / arc degrees
PROJ_DATUM=WGS84
PROJ_UNITS=arc degrees
EPSG_CODE=4326
COVERED AREA=136770403 sq mi
NUM COLUMNS=600
NUM ROWS=550
PIXEL WIDTH=1 arc degrees
PIXEL HEIGHT=1 arc degrees
BIT_DEPTH=8
Which is obviously wrong. It seems like the script is perhaps not finding the .gfw file to me, but it always did before. Since they worked once upon a time, I'm lost now.
Thanks for the help, let me know if you need any more information.
Mark
I have some scripts for loading my local Nexrad radar directly from the NWS ftp site over a custom local background. I haven't used them for some months (since 12.01 ?). For some reason, they won't work now so I re-created them in V13 (b093011), but to no avail. They're so simple, I can't see what could be wrong.
Upon running the script, the file imports, the palette shows up, but GM doesn't seem to find the projection file when loading directly from the website; and so the image is off in "la-la land". I have the necessary .gfw file; and when I copy the image and .gfw to my computer and load it into GM, everything works fine (that's how I got the script). Below is the script, and the resulting metadata when it is run. Has anything changed, or am I missing something simple (more likely)?
The NWS ftp site is: http://radar.weather.gov/ridge/RadarImg/N0R/
The script is:
GLOBAL_MAPPER_SCRIPT VERSION="1.00" FILENAME="C:\Users\MP\Downloads\OTX_N0R_0 for script.gmw"
UNLOAD_ALL
DEFINE_PROJ PROJ_NAME="GEO_WGS84"
Projection GEOGRAPHIC
Datum WGS84
Zunits NO
Units DD
Xshift 0.000000
Yshift 0.000000
Parameters
0 0 0.000 /* longitude of center of projection
END_DEFINE_PROJ
IMPORT FILENAME="http://radar.weather.gov/ridge/RadarImg/N0R/OTX_N0R_0.gif" TYPE="GIF" PROJ_NAME="GEO_WGS84" \
LABEL_FIELD="" SAMPLING_METHOD="NEAREST_NEIGHBOR" AUTO_CONTRAST="NO" CONTRAST_SHARED="YES" \
CONTRAST_MODE="NONE" CLIP_COLLAR="LAT_LON" CLIP_COLLAR_BOUNDS="-121.000000,46.000000,-115.000000,50.000000" \
TEXTURE_MAP="NO"
LOAD_PROJECTION PROJ_NAME="GEO_WGS84"
SET_VIEW GLOBAL_BOUNDS="-125.6125958379,44.3627601314,-112.3915662651,50.6627601314"
The resulting metadata is:
FILENAME=C:\Users\MP\AppData\Local\Temp\GlobalMapper\downloads\radar_weather_gov_ridge_RadarImg_N0R_OTX_N0R_0.gif
DESCRIPTION=radar_weather_gov_ridge_RadarImg_N0R_OTX_N0R_0.gif
UPPER LEFT X=0.0000000000
UPPER LEFT Y=550.0000000000
LOWER RIGHT X=600.0000000000
LOWER RIGHT Y=0.0000000000
WEST LONGITUDE=0° 00' 0.0000" E
NORTH LATITUDE=550° 00' 0.0000" N
EAST LONGITUDE=600° 00' 0.0000" E
SOUTH LATITUDE=0° 00' 0.0000" N
PROJ_DESC=Geographic (Latitude/Longitude) / WGS84 / arc degrees
PROJ_DATUM=WGS84
PROJ_UNITS=arc degrees
EPSG_CODE=4326
COVERED AREA=136770403 sq mi
NUM COLUMNS=600
NUM ROWS=550
PIXEL WIDTH=1 arc degrees
PIXEL HEIGHT=1 arc degrees
BIT_DEPTH=8
Which is obviously wrong. It seems like the script is perhaps not finding the .gfw file to me, but it always did before. Since they worked once upon a time, I'm lost now.
Thanks for the help, let me know if you need any more information.
Mark
Comments
-
Mark,
Where exactly do you have the .gfw file for the .gif files? I agree it looks like that isn't being found. You would need to have them in the temp folder that the .gif files are downloaded to.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Howdy,
When I created the scripts in V12 I had the .gfw file tucked away in a file with saved projections stored in it for easy loading, and GM was finding it there somehow. Now I moved it to my generic download file and everything is okey dokey. I guess it can stay there. Ahh, the labyrinth of Windows.
Thanks again,
Mark
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website