Select to view content in your preferred language

Add {ASCII} format to arcpy.ddd.ASCII3DToFeatureClass Tool

611
2
07-26-2023 05:44 PM
Status: Open
Labels (1)
WentaoChe
Occasional Contributor II

It would be very useful to add {ASCII} format to arcpy.ddd.ASCII3DToFeatureClass Tool.

Now, there are 3 formats are available for ASCII3DToFeatureClass Tool, namely XYZ, XYZI, or GENERATE formats, {ASCII} format is not included.

" The structure of the ASCII file consists of header information containing a set of keywords, followed by cell values in row-major order.

The format of the file in general is:

NCOLS xxx
NROWS xxx
XLLCORNER xxx
YLLCORNER xxx
CELLSIZE xxx
NODATA_VALUE xxx
row 1
row 2
.
.
row n

"   Quoted from ASCII 3D To Feature Class (3D Analyst)—ArcGIS Pro | Documentation

Thank you in advance

Wentao Che

Tokyo, Japan

2 Comments
MarkBryant

👎The ASCII format lines you quote describe an ASCII Raster file.
The ASCII 3D To Feature Class tool is designed to turn text data to feature class.

If you want to turn ascii raster to features, look at chaining together a tool to import the ascii (Copy Raster) and a tool to convert the raster to features (for example Raster to Polygon)

WentaoChe

@MarkBryant , Thank you very much for your valuable advice.

The reason I suggested this idea is that I'm trying to convert a DEM raster (either tif or Grid) to a point shape file, and Raster to Point tool is taking considerably longer than the 'gridpoint' + 'arcshape' tools available in Arc/Info. I've proposed an idea to enhance the performance of 'RasterToPoint' Please Improve RasterToPoint performance  , and I'd appreciate it if you could evaluate it. 

Here's an example for context: with columns and rows of 1000 and 750 respectively,

1. The arcpy.conversion.RasterToPoint Tool takes about 41-46 seconds.
2. The 'gridpoint' + 'arcshape' combination from Arc Commands only takes 12 seconds. Breaking it down, the grid to coverage takes 6 seconds, and the coverage to shape file also takes 6 seconds.

I've compared the performance of ArcGIS Pro 3.1.2 and Arc/Info 10.0 on the same PC, while processing thousands of Grid or tif files. This performance issue is the primary reason why I have not yet transitioned from this particular AML to Pro's Python code.

I believe that arcpy.conversion.RasterToPoint tool should be faster, or at least not considerably slower than the old but reliable Arc/Info tools. Could my perspective be misguided? 

I wish that the ASCII Raster format could be added to the 'ASCII 3D To Feature Class' tool. This could provide an alternative to the 'RasterToPoint' tool.

Thanks again,

Wentao Che