04-02-2020 01:52 AM
Hi all,
after upgrading to M.App Enterprise 2019 Update 3 (16.6.287.3) , when I switch to advanced mode and then I change type from 2D primary to cluster, in the tab Additional Features, no clusters are displayed.
but I do not have Lat/Long fields for geometry x/y in Feature Configuration. I have GEOMETRY field from Oracle spatial table.
In previous releases these fields were not mandatory and the cluster representation was fine.
I also tried setting 'GEOMETRY' (or 'geometry' , by the way what is the difference? ) in Lat/Long fields .
what is going wrong ?
Thanks
04-02-2020 02:20 AM
04-02-2020 03:23 AM
Thanks Ruth,
but I do not have Lat/Long fields for geometry x/y in Feature Configuration. I have GEOMETRY field from Oracle spatial table.
04-02-2020 04:15 AM
Hi g.sbacchi,
In addition to the cluster distance setting, the cluster here requires that lat/long or x/y fields be exposed as attributes in the dataset. These can be added via GeoMedia Desktop application. I suspect you have access to that application as it leads to my next point about the two different geometries here.
GeoMedia Desktop uses the two geometry columns for Oracle spatial database. One is native and one is GDO (added by specifically by GeoMedia).
M.App Enterprise (MAE) is designed to work without vendor specific columns and as such it does not read the GDO geometry only the native one.
Specific to the cluster, the default behavior restoration from past versions that didnt require the setting of lat/long or x/y fields was missed in version 2019 Update 3 and is to be included in the next release. In the meantime, you may request via Support Ticket the hotfix version for Analzyer Views to restore this.
HTH
04-03-2020 04:25 AM
Hi sclow ,
I wonder if i can use a functional attribute for lat/long or x/y fields, using js library.
if so, which library can i use, and how?
an example will be very helpful!
Thanks in advance
04-03-2020 08:02 AM
I suspect you are correct.
Likley this can be done via JS and Functional Attributes as that is very powerful. That is something I haven't explored since the default behavior was expected in MAE 2019 Update 3. It is now on track for that Update 4. As well, the GeoMedia work around achieves the goal and for those without that option there is the hotfix available.
04-03-2020 08:38 AM
hi Giorgio,
you can use a functional attribute like this to extract X:
return turf.centroid(currentRecord["geometry"]).geometry.coordinates[0]
and a similar one for Y:
return turf.centroid(currentRecord["geometry"]).geometry.coordinates[1]
HTH,
Stefano
04-04-2020 07:34 AM
Hi Stefano,
thanks for your tips, but I was unable to solve the problem.
my functional attributes are :
X : return turf.centroid(currentRecord["geometry"]).geometry.coordinates[0];
Y: return turf.centroid(currentRecord["geometry"]).geometry.coordinates[1];
coordinate : return turf.getCoord(currentRecord["geometry"]);
998040 | TypeError: Cannot read property 'type' of undefined | TypeError: Cannot read property 'type' of undefined | TypeError: turf.getCoord is not a function |
998039 | TypeError: Cannot read property 'type' of undefined | TypeError: Cannot read property 'type' of undefined | TypeError: turf.getCoord is not a function |
998038 | TypeError: Cannot read property 'type' of undefined | TypeError: Cannot read property 'type' of undefined | TypeError: turf.getCoord is not a function |
My data source is a Oracle table cached.
Turf.js can be used with Oracle geometry ?
whichTurf.js functions are loaded into Feature Analyzer?
Grazie, ciao
Giorgio
04-06-2020 02:17 AM - edited 04-06-2020 02:17 AM
Can you try to put in front of the functional attribute return call this debug code and check the
console.log(JSON.stringify(currentRecord["geometry"]));
Or, you can even add debugger; statement after the console.log() and see the actual content of the currentRecord["geometry"] variable.
I think that there may not be the actual geometrical information in that field and you may need to expose the Lat/Lon fields in the database (or via DB view)...