|
POST
|
I just tried rescaling a raster, and it seemed to work fine. If you look at the details for the raster (Properties -> Source), do you see the expected cell size information displayed? It's possible that it's a display issue, and the output raster is correct, depending on the scale you're looking at the data. The ASCII driver doesn't support non-square pixels for import, another alternative is to do an initial conversion to a format that does support rectangular cells. For example, you can use GDAL to create a Golden Surfer compatible ASCII grid, by adding DX and DY elements instead of CELLSIZE: DX 0.1667 DY 0.1000 With that alternate header, you can use gdal_translate to output a GeoTIFF which is almost universally readable: gdal_translate -of GTiff output.tif input.asc Another alternative would be to write out the file as a BIL and generate a header with differing X and Y heights, but I'd recommend the solution above over it. Cheers, Shaun
... View more
04-28-2015
09:18 AM
|
1
|
8
|
3818
|
|
POST
|
When you use arcpy.getParameter(0) , you're asking for an object that contains the parameter, not the value of the parameter itself. If you create a parameter with a File datatype, you can instead use the 'GetParameterAsText' call if you'd like the value back as a string. It's hard to tell what you're trying to do specifically since we don't have the toolbox or the utilities module, but I've posted a basic example using a Python toolbox here that works: support/tobler.pyt at master · EsriOceans/support · GitHub If you check out that repository, it includes sample data to show how it works. Note that with a Python toolbox, we use the parameters[0].valueAsText , but it works the same way as getting the parameter as text would.
... View more
04-21-2015
04:28 PM
|
0
|
0
|
1987
|
|
POST
|
Hello Thomas, could you try disabling background processing, then run the tool again? Alternatively, I'd try running the tool from an IDE or command line and not the Python window. Cheers, Shaun
... View more
04-21-2015
01:43 PM
|
0
|
3
|
2271
|
|
POST
|
Do the spreadsheets contain additional date related information? In your example, how did you determine the month and the year? I don't see that data encoded anywhere in the columns listed. I'm also not sure you really need any actual NLP software to do this analysis, you're probably better off starting with a robust date parser, like say bear/parsedatetime · GitHub or https://labix.org/python-dateutil, and using that to generate the dates. You'd still need more information than what's in the spreadsheet, since it doesn't include information about the year, but should help with figuring out the relative date given the year and month.
... View more
04-21-2015
01:38 PM
|
1
|
1
|
1731
|
|
POST
|
Check out Dan Patterson's answer to this question yesterday: ascii codec can't encode character u'\xe1' in position 6: ordinal not in range(128) It's effectively the same issue -- you'll need to declare the file encoding as UTF-8 (or something else that includes Sinhalese within its encoding set), and then tell Python that the strings you're encoding are Unicode by prefixing them with u"", e.g.: str1 = u"මාතා"
... View more
04-21-2015
12:55 PM
|
1
|
0
|
819
|
|
POST
|
In many cases where a geoprocessing tool requires some more complex type, there is an equivalent class to create an object of that type, usually documented in the type parameter information. The Vertical Factor parameter expects an object derived from one of the Verticlal Factor types. In your case, you should be able to use the VfTable type: import arcpy
vertical_factor = arcpy.sa.VfTable("c:/path/vffile.txt")
out_path_dist = arcpy.sa.PathDistance("source.shp", "costraster", "", "", "", "",
vertical_factor)
out_path_dist.save("C:/workspace/path_dist_by_vf.tif") Let us know if that does the trick, or if you have any further questions. Cheers, Shaun
... View more
04-20-2015
06:05 PM
|
0
|
2
|
1987
|
|
POST
|
We announce specific dates for releases that are close to release (like 10.3.1 as you mentioned). For Pro, the releases aren't tied directly to the rest of the ArcGIS release, but generally you should see a Pro release complimentary to each broader release. Note that Pro has an improved mechanism for updating which means that upgrades are more seamless and will likely require less planning around. Pro 1.1 will release in the coming months, and 10.4 and Pro 1.2 will also likely ship in 2015, based on the plenary at DevSummit. Shipping software depends on a number of external factors, and there is naturally some variability in the specifics of the releases.
... View more
04-16-2015
07:38 PM
|
0
|
0
|
3009
|
|
POST
|
Just to reiterate what David Wynne mentioned on the idea, this is fixed in Pro 1.1, and will likely also be included for Desktop 10.4. I agree it's a great feature to have, so that the NumPy array can serve as the common intermediate format for tabular data. Cheers, Shaun
... View more
04-16-2015
05:53 PM
|
0
|
5
|
3009
|
|
POST
|
Jon and Joe, The reason your code doesn't work is your second line: newSpatialReference = newSpatialReference.loadFromString('{B286C06B-0879-11D2-AACA-00C04FA33C20}') This is setting newSpatialReference to the return value of the loadFromString function. But loadFromString doesn't return anything, it sets the calling object value, so you have a None value for the rest of your script, which Define projection doesn't like. To unset projection, just call loadFromString: newSpatialReference = arcpy.SpatialReference()
newSpatialReference.loadFromString('{B286C06B-0879-11D2-AACA-00C04FA33C20}') That will create the object, then assign the value with loadFromString. I tested it and it works fine with DefineProjection. Cheers, Shaun
... View more
04-08-2015
10:24 AM
|
0
|
1
|
2092
|