Hexagon Geospatial
MENU

Smart M.App

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 8
Registered: ‎09-05-2016

Is there a way to convert IMAGINE.Boundary into IMAGINE.FeatureSubset ?

[ Edited ]

What I'm trying to achieve is to allow a user to upload a raster file for a small area and look up a corresponding vector row in a shape file and update some statistics. In order to do this I'm trying to use the Raster Information to retrieve a IMAGINE.Boundary then feed this into Filter By Geometries in order to find any geometries that touch the uploaded raster.

 

Unfortunately I'm unable to get this to work because I haven't been able to find a way to convert an IMAGINE.Boundary type into an IMAGINE.FeatureSubset. I note that when IMAGINE.Boundary is serialized using a Data Output operator that it includes in the JSON the polygon coordinates I want; I even tried to read that as a Text File and use RegExs to create a IMAGINE.FeatureSubset but then got stuck because AFAICT there is no way to save a Text File or deserialize via a String (Data Input only reads a file ?)

 

I was wondering, before I abandon this approach, if there was a way to convert from a Boundary into Features ? (I tried the obvious Convert operator but all I got was an error).

 

I note in some of the knowledge base articles that  features can be passed in as GeoJSON via Javascript , I guess thats the approach I'll take to implement this if I can't read the bounds from a raster. It does seem odd though that you can pass GeoJSON as a string to the service but don't seem to be able to read it from a flat file via Features Input ?

Staff
Posts: 118
Registered: ‎07-04-2016

Re: Is there a way to convert IMAGINE.Boundary into IMAGINE.FeatureSubset ?

Hello michael,

 

You can use different approach. Below is the model for creating a footprint for the real image data (excluding Background):

 

Raster_footprint.png

Then you can easily use the output feature as the input to FilterByGeometries operator.

 

Attaching the model as well.

 

Kind Regards,

Marina Vardovska

Kind Regards,
Marina Vardovska
Hexagon Geospatial Support
Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.