10-08-2019 07:27 AM
Is it possible to connect to alphanuleric data through Spatial Modeler, create a new point geometry attribute, and populate this new geometry by geocoding process based on 2 numeric attributes from the alphanumeric sources?
If this operation is possible, has someone a .gmdx example?
Solved! Go to Solution.
10-08-2019 09:09 AM
If the two numeric attributes represent X/Y or lon/lat then you are referring to what GeoMedia calls "coordinate geocoding" rather than "address geocoding". The functionality equivalent to the Geocode Coordinates command (and corresponding pipe) has not yet been made available in Spatial Modeler. It would be reasonable to do so, and I would welcome the creation of an Idea to that effect on the Ideation board. We would likely choose to implement it through a new expression function available in the Generate Functional Attributes operator, though we could also create a dedicated operator that uses GFA internally.
Others more knowledgeable of the complete set of offerings in Spatial Modeler may know of some other way to achieve your goal besides what I mention above. - Hal
10-09-2019 02:52 AM
Yes, it is exactly the need, an operator making the GeoCode Coordinates pipe query. For me, it is a very important operator, because a lot of input data doesn't contain geomerties, but prior coordinates
I will fill an Idea for it
10-14-2019 07:53 AM - edited 10-14-2019 08:26 AM
A bit of experimentation has come up with a potential workflow. Or two.
If the data is in Excel spreadsheet format (as indicated in the Idea you posted) then you could save the spreadsheet to CSV and use the GeoCSV reader to convert to features with point geometries.
Otherwise I came up with the following. As an example I used a raster input which was a Clump result. So it contained attributes which represented the X Pixel, Y Pixel, X Map and Y Map coordinates of each clump (amongst other attributes). But you could instead be just reading a database table. I fed just the attributes from the raster to a Features Input operator which effectively converts the raster attribute table into a feature stream with just attributes (no geometries). I then used a Remove Attributes to get rid of X Pixel and Y Pixel since they would just confuse matters. I wanted to make sure the X Map and Y Map values were the first numeric fields encountered. I then fed this feature stream to a Features Output to create a .csv temp file, but really all I wanted was the feature stream from that which has converted the X and Y coordinates into point geometries.
Does that help?
10-14-2019 08:08 AM
Oops - you do need ERDAS IMAGINE 2020 or Spatial Modeler 2020 to run the model I showed. Should be avaIilable in a couple of weeks!
10-14-2019 08:54 AM
All the operators in the example below are available in 2018 version
I have used the following workflow to generate a .csv file :
You will find the .csv file attached (zipped, .csv files can not be directly attached)
In Spatial Modeler, I have :
In both results, NO GEOMETRY is present, the Features Information has no PrimaryGeometryFieldName in the output ports
Can you make the same (plug a Feature Information operator after each operation) to be sure than you have no geometry after the Remove Attributes operator? Other test : can you execute your workflow on the .csv file attached to show me how to add a Point Geometry to this kind of data?
10-14-2019 09:07 AM
I don't think you have a point CSV:
Once you have your data formatted as a point GeoCSV all you should need to do is use Features Input to read it. Features Input should recongise appropriately named attribute columns(e.g. CoordX, CoordY) and turn them (and their attributes) directly into Features with geoemtry and other attributes.
10-14-2019 09:16 AM - edited 10-14-2019 09:17 AM
Is this a Locale thing with Windows? Decimal points (.) and commas (,) are getting swapped in floating point numbers, so semicolons ( ; ) are being used as a seperator instead of commas?
10-14-2019 09:29 AM
Yep, that was it. I used a text editor to replace , with . and then replaced ; with ,
I also added column titles, so everything in Excel now looks like this:
And if I use Features Input I get point geometries: