I was looking at the GeoServer Importer module, and have discovered that it
is not capable of importing CSV files as spatial files:
When importing a CSV file, the Importer module ony provides the
CSVDataStoreFactory with a file name, and no other connection parameters.
This causes the factory to buld a data store using the
CSVAttributesOnlyStrategy, meaning that spatial data is not imported.
However, all the infrastructure required to import spatial CSV files does
exist, and can be selected by providing the CSVDataStore factory with some
additional connection parameters.
Since there is no way of specifiying additional connection parameters for
file-based data stores through the importer, there is a bit of work
required to support importing CSV geometries.
A few options are available:
- Create a new CSV strategy that tries to guess spatial columns
- If any columns are named lat / lattitude or lng / long / longitude,
use a LatLong strategy.
- If any columns can be parsed as WKT, use a WKT strategy
- Add a step to the importer (and the GeoServer import API) that allows
the user to specify their strategy/connection params.
A combined approach would probably be the best, where the importer tried to
guess the format, but still allowed the user to select the connection
parameters, providing the calculated guesses as (preselected) possible
values.
I am currently looking into implementing this.
If anyone has any additional concerns or input they would be appreciated.
Thanks,
Torben Barsballe
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel