koop icon indicating copy to clipboard operation
koop copied to clipboard

CSW provider for koop

Open mhogeweg opened this issue 9 years ago • 9 comments

I'm considering a CSW provider for koop. this would find item registered in CSW catalogs. question: these items can range from web services (ArcGIS, OGC) to data files (zipped Shapefile most commonly). is there a pattern for this?

mhogeweg avatar May 21 '15 02:05 mhogeweg

Would this work by exposing a FeatureService layer whose ID was backed by data from a CSW catalog? That would be great.

Perhaps look at Koop-Gist which can load geojson from a URL. That would be similar but need to instead parse the shapefile or other content type.

ajturner avatar May 21 '15 12:05 ajturner

is koop-gist installed by default in the koop sample app? was trying to get this gist: https://gist.github.com/mhogeweg/0fa3ba33824ec8491972

but getting this koop error:

ReferenceError: D:\My Documents\GitHub\koop-sample-app\node_modules\koop-gist\views\demo.ejs:65
   63|         $('#'+mapDom).css({ width:document.width, height: document.height });
   64|         var koop = koopMap( mapDom );
>> 65|         koop.add(location.origin + '/gist/' + '<%= id %>' + '/FeatureServer/0');
   66|       });
   67| 
   68|     </script>

id is not defined
   at eval (eval at <anonymous> (D:\My Documents\GitHub\koop-sample-app\node_modules\ejs\lib\ejs.js:455:12), <anonymous>:11:28)
   at D:\My Documents\GitHub\koop-sample-app\node_modules\ejs\lib\ejs.js:482:14
   at View.exports.renderFile [as engine] (D:\My Documents\GitHub\koop-sample-app\node_modules\ejs\lib\ejs.js:348:31)
   at View.render (D:\My Documents\GitHub\koop-sample-app\node_modules\express\lib\view.js:93:8)
   at EventEmitter.app.render (D:\My Documents\GitHub\koop-sample-app\node_modules\express\lib\application.js:566:10)
   at ServerResponse.res.render (D:\My Documents\GitHub\koop-sample-app\node_modules\express\lib\response.js:938:7)
   at controller.preview (D:\My Documents\GitHub\koop-sample-app\node_modules\koop-gist\controller\index.js:108:9)
   at Layer.handle [as handle_request] (D:\My Documents\GitHub\koop-sample-app\node_modules\express\lib\router\layer.js:82:5)
   at next (D:\My Documents\GitHub\koop-sample-app\node_modules\express\lib\router\route.js:110:13)
   at Route.dispatch (D:\My Documents\GitHub\koop-sample-app\node_modules\express\lib\router\route.js:91:3)

mhogeweg avatar May 21 '15 14:05 mhogeweg

is koop-gist installed by default in the koop sample app?

yes (see here)

i'm under the impression that the gist provider expects individual gists to be valid GeoJSON.

jgravois avatar May 21 '15 15:05 jgravois

looks like it. when I leave the preview off I get:

"Error: could not parse file contents SyntaxError: Unexpected token <"

but the basic idea is to provide an id of a dataset and then return directly this dataset. what if the dataset is a web service?

mhogeweg avatar May 21 '15 16:05 mhogeweg

making progress. not really a CSW provider, but one for Geoportal Servers.

  • Registered 2 Geoportal Servers

koop_gpt

  • List all entries in the Geoportal Catalog (not paging yet)

koop_gpt_gpt

  • Fetch an individual entry

koop_gpt_gpt_ 7b71aaed01-7a25-4f70-bc21-6b20ad243b20 7d

  • TO DO
    • paging of entire list (is this list even done in other providers?)
    • searching (is this done in other providers?)
    • additional formats for an item (dealing with shapefile, WMS, ArcGIS Rest, web sites

any suggestions on these to-do items welcome.

mhogeweg avatar May 25 '15 16:05 mhogeweg

searching (is this done in other providers?)

all the providers i've seen expect explicit requests for known resources

additional formats for an item (dealing with shapefile, WMS, ArcGIS Rest, web sites)

its up to the individual provider to convert any and all unique filetypes it encounters to GeoJSON. afterwards it becomes possible to leverage the built in capability of koop to turn GeoJSON into Geoservices JSON, kml, zipped shapefile, etc. That being said, if some of the resources you'll be encountering are something koop-agol can already parse, you should be able to leverage that as a dependency too.

jgravois avatar May 25 '15 16:05 jgravois

@mhogeweg as @jgravois pointed out - there has not been any 'Koop catalogs' - however it would be useful to provide the catalog listing in addition the resources. This would make a full featured federated integration of Search+Access.

Awesome work! Perhaps we should also build a Koop-OpenSearch and extend Koop-AGOL

ajturner avatar May 25 '15 16:05 ajturner

Interesting. How do you see this work? When there are 1000s of possible datasets in the existing catalogs?

mhogeweg avatar May 25 '15 16:05 mhogeweg

Via filtering & Pagination. In fact, make them a feature service. So I could add a CSW catalog as a layer in my map. In an all I could then make the onclick handler add that Item as another layer using the Featureservice proxy via Koop.

Similarly Koop could provide a proxy to expose CSW or AGOL as DCAT and vice versa. I could add Data.gov as a layer.

ajturner avatar May 25 '15 17:05 ajturner