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

2020-10-18 Thread Jody Garnett
s"< > geoserver-users@lists.sourceforge.net>; > *Subject: * Re: [Geoserver-users] why ResourcePool retrieve DataStore by > parameters? > > In that case you should be checking to see what the URL ends with a unique > extension - so for example GeoJSONDataStore and ShpDatastore

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 two

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

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

[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