Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
From: | "Jason Roberts" <> |
---|---|
To: | "'KH Stimmel'" <> |
Cc: | <> |
Subject: | RE: [mget-help] mget |
Date: | Fri, 23 Mar 2012 10:21:55 -0400 |
Hello Karl-Heinz,
We're glad you're enjoying the tools!
When you run the Python scripts from outside of ArcGIS, it is necessary to
provide full paths to feature classes and rasters. Instead of doing this:
python <path>ArcGISRasterSamplerSampleRasters.py test ASCIITo_10m_1 ...
Do this:
python <path>ArcGISRasterSamplerSampleRasters.py <path>\test.shp
<path>\ASCIITo_10m_1 ...
Does that make sense? I'm pretty sure that is the problem. But it might not
be, because the error message is not quite what I was expecting. I was
expecting the tool to complain that the feature class did not exist, like
this:
C:\Users\Jason>C:\Python26\ArcGIS10.0\python.exe "C:\Program
Files\GeoEco\ArcGISToolbox\Scripts\ArcGISRasterSamplerSampleRasters.py" test
ASCIITo_10m_1 wsp # NEAREST # # # test
2012-03-23 10:19:54,832 ERROR ValueError: The feature class or layer
C:\Users\Jason\test, specified for the pointFeatures parameter, does not
exist. Please specify an existing feature class or layer.
...
Instead it complained that a field did not exist. That suggests the feature
class DID exist. Perhaps you ran the tool from a directory that DID have a
feature class or something else called test, but it did not have a field
called wsp?
Hope that helps,
Jason
-----Original Message-----
From: KH Stimmel
[mailto:]
Sent: Friday, March 23, 2012 6:16 AM
To:
Subject: [mget-help] mget
Hi Nicholas,
I recently found your mget tools. I used them in ArcGis ...great !!!
Now I want to try using python.
I would like to Sample Rasters using the syntax
python <path>ArcGISRasterSamplerSampleRasters.py test ASCIITo_10m_1 wsp #
NEAREST # # # test but it doen not work !
ERROR ValueError: The field wsp, specified .... does not exist
The same data work via Arcgis fine...
Executing (ArcGISRasterSamplerSampleRasters_5):
ArcGISRasterSamplerSampleRasters test ASCIITo_10m_1 wsp # NEAREST # # # test
Start Time: Fri Mar 23 10:49:17 2012 Running script
ArcGISRasterSamplerSampleRasters...
Sampling rasters: points=test, rasters=[u'ASCIITo_10m_1'],
fields=[u'wsp']...
Sampled 1 rasters at 935 points.
Completed script ArcGISRasterSamplerSampleRasters...
Executed (ArcGISRasterSamplerSampleRasters_5) successfully.
End Time: Fri Mar 23 10:49:29 2012 (Elapsed Time: 12.00 seconds)
do you have any idea and can help me
thanks a lot
Karl-Heinz
We're glad you're enjoying the tools!
When you run the Python scripts from outside of ArcGIS, it is necessary to
provide full paths to feature classes and rasters. Instead of doing this:
python <path>ArcGISRasterSamplerSampleRasters.py test ASCIITo_10m_1 ...
Do this:
python <path>ArcGISRasterSamplerSampleRasters.py <path>\test.shp
<path>\ASCIITo_10m_1 ...
Does that make sense? I'm pretty sure that is the problem. But it might not
be, because the error message is not quite what I was expecting. I was
expecting the tool to complain that the feature class did not exist, like
this:
C:\Users\Jason>C:\Python26\ArcGIS10.0\python.exe "C:\Program
Files\GeoEco\ArcGISToolbox\Scripts\ArcGISRasterSamplerSampleRasters.py" test
ASCIITo_10m_1 wsp # NEAREST # # # test
2012-03-23 10:19:54,832 ERROR ValueError: The feature class or layer
C:\Users\Jason\test, specified for the pointFeatures parameter, does not
exist. Please specify an existing feature class or layer.
...
Instead it complained that a field did not exist. That suggests the feature
class DID exist. Perhaps you ran the tool from a directory that DID have a
feature class or something else called test, but it did not have a field
called wsp?
Hope that helps,
Jason
-----Original Message-----
From: KH Stimmel
[mailto:]
Sent: Friday, March 23, 2012 6:16 AM
To:
Subject: [mget-help] mget
Hi Nicholas,
I recently found your mget tools. I used them in ArcGis ...great !!!
Now I want to try using python.
I would like to Sample Rasters using the syntax
python <path>ArcGISRasterSamplerSampleRasters.py test ASCIITo_10m_1 wsp #
NEAREST # # # test but it doen not work !
ERROR ValueError: The field wsp, specified .... does not exist
The same data work via Arcgis fine...
Executing (ArcGISRasterSamplerSampleRasters_5):
ArcGISRasterSamplerSampleRasters test ASCIITo_10m_1 wsp # NEAREST # # # test
Start Time: Fri Mar 23 10:49:17 2012 Running script
ArcGISRasterSamplerSampleRasters...
Sampling rasters: points=test, rasters=[u'ASCIITo_10m_1'],
fields=[u'wsp']...
Sampled 1 rasters at 935 points.
Completed script ArcGISRasterSamplerSampleRasters...
Executed (ArcGISRasterSamplerSampleRasters_5) successfully.
End Time: Fri Mar 23 10:49:29 2012 (Elapsed Time: 12.00 seconds)
do you have any idea and can help me
thanks a lot
Karl-Heinz
Archives powered by MHonArc.