Re: [Geoserver-users] why ResourcePool retrieve DataStore by parameters?

2020-10-16 Thread Yang
The URI of my store is a directory. Now I have added an extra useless parameter to the store, it works now. -- Original -- From:  "Ian Turton";___ Geoserver-users mailing list Please make sure you read the following t

Re: [Geoserver-users] why ResourcePool retrieve DataStore by parameters?

2020-10-16 Thread Ian Turton
In that case you should be checking to see what the URL ends with a unique extension - so for example GeoJSONDataStore and ShpDatastore both have a URL but only match if it ends with the right extension. So you will only get a ShapefileDataStoreFactory back if the URL ends in "shp" or "SHP" see

Re: [Geoserver-users] why ResourcePool retrieve DataStore by parameters?

2020-10-16 Thread Yang
Why I ask this is that I am trying to build a custom datastore which only require one parameter "url" to the path, and the path is a directory. So the `ShapefileDirectoryDataStore` will be returned back  early. Fine, I will tried to add a new Param for the factory and to see if this can be so

Re: [Geoserver-users] why ResourcePool retrieve DataStore by parameters?

2020-10-16 Thread Andrea Aime
On Fri, Oct 16, 2020 at 10:52 AM Yang wrote: > Also, I wonder why it does not use the type of the DataStoreInfo to get > the result directly? > Because we occasionally rewrite the datastores from the ground up, this has happened for all JDBC stores, and for the WFS store for example. If the code

[Geoserver-users] why ResourcePool retrieve DataStore by parameters?

2020-10-16 Thread Yang
Hi: Geoserver can retrieve DataAccess by a DataStoreInfo by ResoucePool.getDataStore(DataStoreInfo info) where it try to get the DataStore from : public class ResourcePool { ... public DataAccess___ Geoserver-users mailing list Please make su