Skip to main content
Archived

Esri_In_memory_FeatureReader and Esri_In_memory_FeatureWriter

Related products:Transformers
  • June 6, 2016
  • 1 reply
  • 5 views
siennaatsafe
gracecai
ml56067
amdubois
+2
  • siennaatsafe
    siennaatsafe
  • gracecai
    gracecai
  • gpoehacker
  • ml56067
    ml56067
  • amdubois
    amdubois
  • adriano
    adriano
  • mwinsor

If that is even possible……

Assuming you are reading in poitclouds and want to make hillshades - using the ArcGIS hillshade_3D function - out of them.

So you read the poitclouds make the raster with a DEMGenerator.

Now you want to call the ESRI hillshade function (and other functions) with a PythonCaller using arcpy.

But first you have to save the raster on disk, so ESRI can access it by reading it in again.

In Python arcpy you can use the ESRI in_memory workspace:

env.workspace = r"in_memory"

env.overwriteOutput = True

inRaster = FME_MacroValues['inRaster']

inRemapFile = FME_MacroValues['inRemapFile']

arcpy.HillShade_3d(inRaster,"TMPRaster", azimuth, altitude, modelShadows, zFactor)

OutRaster = ReclassByASCIIFile("TMPRaster",inRemapFile)

OutRaster.save(FME_MacroValues['OutRaster'])

arcpy.Delete_management("in_memory")

The raster comes to the PythonCaller as an FME object.

So instead of reading the raster from disk again, it wold be great,

if you can write the raster (or any other point, line or polygon Feature)

directly into the “memory workspace” of ESRI.

With a parameter – lest say selfdistruction Yes, or No – you can copy the feature into the memory workspace,

or move it there and delete the FME object from memory.

After the ESRI functions you can read the object back from the ESRI memory into the FME memory

and the translation continues in FME with some tiling or reasampling the raster and writes the rasters finally to disk.

This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

ml56067
Contributor
Forum|alt.badge.img+2
  • Contributor
  • December 30, 2016

By being able to read and write to the Esri in_memory workspace from within a PythonCaller opens up the possibility of using any of Esri's Geoprocessing tools.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings