Hi If I have a test CSV file as follows
ID,Lon,Lat 1,120.1,-35.2 And use the CSV Vector Data Source, choosing 'guess' as the strategy, on trying to create the Layer you get the following error: Failed to load attribute list, internal error is: the SimpleFeatureType test:test does not contains the configured attribute Lon. Check your schema configuration It seems at the below point in the code the layer tries to load the feature type with each property based on the list of attributes found in the CSV https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/catalog/ResourcePool.java#L1078 But in GeoTools the Lat/Lon columns are removed on encoding of the Point class, which means the feature type does not have the attributes GeoServer is looking for https://github.com/geotools/geotools/blob/master/modules/plugin/csv/src/main/java/org/geotools/data/csv/parse/CSVLatLonStrategy.java#L121 I'm not sure where this bug resides. Part of me thinks that the Lat/Lon fields shouldn't be dropped when parsing a CSV, as they hold useful human-readable information. But I don't know the internal logic of GeoTools all that well compared to GeoServer. Anyway, I haven't been able to get CSVs working with GeoServer 2.18.1, and any help would be appreciated. Thanks Michael Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
