Skip to main content
Solved

Point cloud to raster - issue defining the output raster cell size using existing raster


makt
Contributor
Forum|alt.badge.img+1
  • Contributor
I have this workspace:

 

read LAS ->PointCloudCoercer->RasterDEMGenerator

 

 

I also have read into the workspace a raster (ECW)

 

 

In the parameters of the RasterDEMGenerator, I have defined the resolution of the output as:

 

Output DEM X Cell Spacing: $(SourceDataset_ECW)

 

Output DEM Y Cell Spacing: $(SourceDataset_ECW)

 

 

This fails with the error:

 

RasterDEMGenerator(SurfaceModelFactory): Fail to process the SAMPLE_SPACING clause because it contains an invalid entry or it contains an invalid number of entries.

 

 

The ECW file is very much not corrputed, and reads fine in Data Inpector.

 

 

How should I be referencing  the properties of an already existing raster with the RasterDEMGenerator?

 

 

The overall goal here is of course to output a raster from a point cloud that has the exact resolution of an already existing raster and is also "snapped" to it.

 

 

 

 

 

Best answer by takashi

Sorry, my previous post was not clear. The WorkspaceRunner should be added in the 2nd workspace. My intention is as the following images.

 

 

1st (main) workspace

 

 

 

2nd (runner) workspace

 

 

View original
Did this help you find an answer to your question?
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.

12 replies

takashi
Influencer
  • April 22, 2014
Hi,

 

 

The RasterPropertiesExtractor can be used to extract raster properties including spacing x, y (called _spacing_x, _spacing_y). You can then merge the attributes to the LAS feature with the FeatureMerger, and specify them to the parameters of the RasterDEMGenerator.

 

The RasterPropertiesExtractor extracts many properties. It's better to remove attributes except spacing x, y before merging to save memory usage.

 

 

Takashi

makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 22, 2014
Hi Takashi,

 

 

I tried using the RasterPropertiesExtactor before, and I just did it again with your advice about using the FeatureMerger. Unfortunatly, I cant get the _spacing_x and _spacing_y to show up as an attribute value option in the RasterDEMGenerator parameters. I only can get the variables under User Parameter. 

 

 

As a test, I tried using the NumericRasterizer (not really what I want), and with this transformer, I could get the spacing attributes read in as a parameter - but then I get the error: NumericRasterizer(VectorToRasterFactory): Cannot convert 'X_CELL_SIZE' value of ''

 

 

Below is a picture of my workspace, along with the parameters of the RasterDEMGenerator (and the lack of access to the x and y spacing attributes). 

 

 

 


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 22, 2014

Also - Im unclear how defining the same raster spacing / cell size would guarantee that the cells would overlap with a pre-existing raster? Does that guarantee require still another transformer?


takashi
Influencer
  • April 23, 2014
Ah, I was wrong. "Output DEM X/Y Spacing" cannot be specified as attribute value...

 

A workaround I can think of is:

 

Define published user parameters to recieve x, y spacings (e.g. X_SPACING, Y_SPACING). Specify them to parameters of the RasterDEMGenerator.

 

Create a 2nd workspace to extract x, y spacings from the ECW. In the workspace, use a WorkspaceRunner to pass the spacing values to the main workspace.

 

Run the 2nd workspace.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • April 23, 2014
Yup, the attribute value limitation is a bit of hindrance here.

 

 

Eitehr workspace runner schem, like Takashi suggest or maybe use scripted parameter.

 

 


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 23, 2014
Hey Takashi / Gio. Seems like this questions is taking me down an unexpected path! I am going to try the workspace runner method, as it seems simpler - though I still have some basic questions about it:

 

 

Takashi, following your advice on the first workspace, could you give some clarification? How do I pass the x_spacing and y_spacing that comes from RasterPropertiesExtractor to a user parameter and have that be the "output" of an entire workspace? 

 

 

The way I tried was to setup a workspace ECW>RasterPropertyExtractor, then on the Navigator tab, under UserParameters>Published Parameters, I right clicked that pressed "Add parameter", but when I try to link the default value to the Attribute Value of the the RasterPropertyExtractor I only have "User Parameter" as an option. Am I taking the wrong approach?

 

 

 

 


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 23, 2014
After posting the above, I realized I need an "AttributeCreator" to expose the x and y spacing publicly (called xx and yy in the below picture). Just want to confirm this is the correct approach? 

 

 


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 23, 2014
As for the second part of the solution - I tried working with WorkspaceRunner, but I am obvioulsy missing something. Do I need a special transformer to fetch a public parameter from the first workspace? Here is a screen shot showing where I expected I might have access to the parameters in the other workspace via workspace runner:

 

 

 


takashi
Influencer
  • Best Answer
  • April 24, 2014
Sorry, my previous post was not clear. The WorkspaceRunner should be added in the 2nd workspace. My intention is as the following images.

 

 

1st (main) workspace

 

 

 

2nd (runner) workspace

 

 


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 24, 2014
Hi Takashi,

 

 

Thanks for the additional tips - however, having never used this approach before, I am struggling to figure out how I can "use a WorkspaceRunner to pass the spacing values" as you show in your second picture. Is this done through the Navigator window, a transformer, the parameters of the workspacerunner...?

takashi
Influencer
  • April 24, 2014
You can pass appropriate values to published parameters of the 1st workspace through parameter settings in the WorkspaceRunner.

 

 


makt
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 24, 2014
Thanks - got it working! 

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