There is an arcgis-rest module that seems to support AGS FetureServer:
https://github.com/geotools/geotools/blob/main/modules/unsupported/arcgis-rest/src/main/java/org/geotools/data/arcgisrest/schema/services/feature/Featureserver.java
and it seems to know a bit about esriFieldTypeOID
https://github.com/geotools/geotools/blob/0d53ea0fff88f74588d0dab365894a56dea24361/modules/unsupported/arcgis-rest/src/main/java/org/geotools/data/arcgisrest/ArcGISRestFeatureSource.java#L76
You might be able to add the "native" type to the userData Map of the
PropertyDescriptor (attribute) Map of the FeatureType while it parsers
the service definition in ArcGISRestFeatureSource#buildFeatureType().
-M
On 13-03-2024 01:59, SPDBA wrote:
> I am accessing them via GeoTools so I want a GeoTools based solution.
This is what I do initially to try and identify the "primary key"
String key = "[fixme]";
List<AttributeDescriptor> adl = schema.getAttributeDescriptors();
for (AttributeDescriptor attribute : adl) {
if ( attribute.getType().isIdentified()
||
attribute.getLocalName().equalsIgnoreCase("OBJECTID")) {
key = attribute.getLocalName();
break;
}
}
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users