koopjs / koop

Transform, query, and download geospatial data on the web.
http://koopjs.github.io
Other
651 stars 125 forks source link

CSW provider for koop #172

Open mhogeweg opened 9 years ago

mhogeweg commented 9 years ago

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?

ajturner commented 9 years ago

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.

mhogeweg commented 9 years ago

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)
jgravois commented 9 years ago

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.

mhogeweg commented 9 years ago

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 commented 9 years ago

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

koop_gpt

koop_gpt_gpt

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

any suggestions on these to-do items welcome.

jgravois commented 9 years ago

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.

ajturner commented 9 years ago

@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

mhogeweg commented 9 years ago

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

ajturner commented 9 years ago

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.