Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arcgis. esriFieldTypeSingle is not included in the cases of GisAttributeType #2334

Closed
danielvillalbamota opened this issue Jan 31, 2024 · 3 comments

Comments

@danielvillalbamota
Copy link
Collaborator

esriFieldTypeSingle is not included as one of the cases in:

public static GisAttributeType fromString(String strType) throws ArcgisException {
strType = strType.replace("esriFieldType", "");
switch (strType) {
case "Date":
return GisAttributeType.DATE;
case "Integer":
case "SmallInteger":
return GisAttributeType.INTEGER;
case "Number":
case "Double":
return GisAttributeType.NUMBER;
case "Boolean":
return GisAttributeType.BOOLEAN;
case "String":
return GisAttributeType.STRING;
case "OBJECTID":
case "OID":
return GisAttributeType.OID;
case "GlobalID":
return GisAttributeType.GID;
case "Geometry":
return GisAttributeType.GEOMETRY;
default:
throw new ArcgisException("Invalid string type: " + strType);
}
}

esriFieldTypeSingle could return GisAttributeType.NUMBER.

Moreover, esriFieldTypeNumber defined in:

is not a "esriFieldType". So another solution would be replace case "Number": by case "Single":

@fgalan
Copy link
Member

fgalan commented Jan 31, 2024

PR #2335

@fgalan
Copy link
Member

fgalan commented Jan 31, 2024

PR has been merged. @danielvillalbamota please close this issue if after testing the problem has been solved.

@danielvillalbamota
Copy link
Collaborator Author

It works, the fix solves this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants