ckan / ckanext-spatial

Geospatial extension for CKAN
http://docs.ckan.org/projects/ckanext-spatial
125 stars 192 forks source link

CSW harvester OutputSchema config support #258 #259

Open ccancellieri opened 2 years ago

ccancellieri commented 2 years ago

This will close #258 adding support to an additional param into the csw json config:

"output_schema": "mdb"

mdb is the namespace of the schema to use (in this case it's an iso19115-3.2018)

{'mdb':'http://standards.iso.org/iso/19115/-3/mdb/2.0'}

Full Example below:

{
"user":"ckan_admin",
"cql": "dc:identifier = '0-----292--------------------------'",
"output_schema": "mdb",
"default_tags": [ ],
"default_extras": {},
"group_mapping": {},
"read_only": false
}

Doing this the CSW harvester will receive the metadata in the configured outputschema (must be supported by the target csw server).

ccancellieri commented 2 years ago

Can also help

209

210

219

frafra commented 2 years ago

This is great :) Do you need any help with this PR?

frafra commented 2 years ago

I get this generic error after applying this PR (rebased on master) : Error contacting the CSW server: can only parse strings. I think there is a problem with the changes made to the __init__ function of CswService.

ccancellieri commented 2 years ago

Ciao @frafra thanks to look into this. I think something bad could happen here:

https://github.com/ckan/ckanext-spatial/blob/b82eb89244ddfc640be8811572e730c2ea3b94a9/ckanext/spatial/lib/csw_client.py#L210

Would you be able to check the response provided by the server?

I'm apologize but I'm not using this plugin anymore, I changed approach, so my help can be very limited on this.

frafra commented 2 years ago

@ccancellieri I think you are right, I will look into that. Which approach have you taken, If I may ask? I am interested into harvesting data from GeoNetwork too.

ccancellieri commented 2 years ago

Please search for json and geospatial keywords under ckan discussions ;)

Il giorno ven 4 mar 2022 alle ore 10:22 Francesco Frassinelli < @.***> ha scritto:

@ccancellieri https://github.com/ccancellieri I think you are right, I will look into that. Which approach have you taken, If I may ask? I am interested into harvesting data from GeoNetwork too.

— Reply to this email directly, view it on GitHub https://github.com/ckan/ckanext-spatial/pull/259#issuecomment-1058986299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG5WW6GMNHSSTZJGE5UIHTU6HI5NANCNFSM5GQO7MWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Carlo Cancellieri Skype: ccancellieri Twitter: @cancellieric LinkedIn: http://it.linkedin.com/in/ccancellieri/

frafra commented 2 years ago

Related: