Hexagon Geospatial

M.App Enterprise

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Posts: 2
Registered: ‎10-05-2018
Accepted Solution

How to import point data for use in a MAE Mobile app

I have telephone pole data with lat/longs in a csv that i would like to build a mobile inspection app around.  I have been using the Lab6 tutorial as a template app and it seemed to be straight forward until I realized the app uses GUIDs for a pkey and the data I imported into PostGIS uses an integer.  The app does not have to create new poles, just change attributes and snap pictures.  How do I populate the existing records with a compatible GUID and geometry?

Frequent Contributor
Posts: 114
Registered: ‎05-25-2016

Re: How to import point data for use in a MAE Mobile app

 In fact, you only need the UID´s in the mobile app if you want to add features, particularly if you need to add features while the mobile device is offline. GUID´s will ensure that the id value given to a new feature is unique, if you use integers then another user may send a new feature with the same id making a mess of your data. 

If you still want to give it a try, the GUID doesn´t need to be the actual PK in postgres you just define it as a PK on the app. Easy way to do what you need is to load the CSV into postgres and manually add the GUID column (character(36)) then generate the UID values with a query ( SELECT uuid_generate_v4()::text; ).  


Posts: 98
Registered: ‎10-25-2016

Re: How to import point data for use in a MAE Mobile app

If you only edit data you can keep your integer column as key field.


To generate a geometry column from your lat/long values you can use ST_Point function.




Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Development Ticket through our Development Ticket Portal.