TransWikia.com

Raster to Point in ArcMap: export raster data to a point shapefile with geometry of a given point shapefile

Geographic Information Systems Asked by stonebe on October 9, 2020

I want to export a calculated raster to a point shapefile with predefined geometry (i.e. positioning and extent of the points). Points not covered by the raster should return empty values (e.g. NoData). It works for the positioning of the points, however it does not work for the extension of the points.

I do have:

  • point shapefile MyTemplatePoints.shp as a template
  • raster file mytempr calculated from template point shapefile above
  • raster file mycalcr calculated from various input data in an arcpy-script
  • point shapefile MyCalculatedPoints.shp exported from mycalcr with Raster to Point (Conversion)

The arcpy-script to calculate mycalcr contains the following command line:

arcpy.env.snapRaster = mytempr

By this, the centroids of the cells of mycalcr snap to those of mytempr. The two rasters have different extensions which is not a problem. Export of mycalcr to MyCalculatedPoints.shp is performed with Raster to Point (Conversion) with input parameters as shown to the left in the image. The points of MyCalculatedPoints.shp fit to the positioning of the points of MyTemplatePoints.shp as visible to the right in the image. However, the extension of MyCalculatedPoints.shp does not match the extension of MyTemplatePoints.shp as I would expect by Environment Settings > Processing Extent.

It seems to me that this processing is unsuitable to generate a point shapefile with larger extension than the raster itself (and to fill these points with empty values, e.g. NoData).

What am I missing?

enter image description here

One Answer

The hint by BERA made me find the solution: use Spatial Analyst Tools > Extraction > Extract Values to Points and define the desired Extent and Snap Raster in the Environment Settings:

enter image description here

Answered by stonebe on October 9, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP