I need to check if the GPS coordinate is within a polygon of my geodatabase and return the record table of that polygon.
Below is the code snippet that reads my geodatabase:
I need to check if the GPS coordinate is within a polygon of my geodatabase and return the record table of that polygon.
Below is the code snippet that reads my geodatabase:
private void loadGeodatabase() { String path; path = Environment.getExternalStorageDirectory().getPath() + "/gdbuam.geodatabase"; final Geodatabase geodatabase = new Geodatabase(path); Log.d("GEO", path); geodatabase.loadAsync(); geodatabase.addDoneLoadingListener( () -> { if(geodatabase.getLoadStatus() == LoadStatus.LOADED){ GeodatabaseFeatureTable table = geodatabase.getGeodatabaseFeatureTableByServiceLayerId(0); System.out.println("Nome da tabela: " + table.getTableName()); }else{ Toast.makeText(Screen_Pre_Certificado_Tractor.this, "Erro ao carregar!!!!", Toast.LENGTH_LONG).show(); } });}
Hi Jose,
I am facing the same issue. I have several polygons drew on map; and I have a long press MotionEvent. The user will need to long press on of the polygon, and my software have to identify if the coordinate is lying within which polygon.
Have you successfully resolve this issue? It would be great if you able to share the solution.
Thanks!
My issue's thread:
GeometryEngine.contains static method - GeometryEngine (ArcGIS Runtime SDK for Android 100.7.0) able to serve the purpose of verifying.
boolean isContain = GeometryEngine.contains(p, ltLn);