GeoNode / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
1.43k stars 1.12k forks source link

GML from Geonode does not validate: invalid gml #1366

Closed batje closed 10 years ago

batje commented 10 years ago

I am using CKAN to harvest the CWI endpoint of Geonode. CKAN complains that the GML is invalid. I can not see the GML myself (I think it is generated after a POST request, am trying to install the QGIS CWI plugin on an old QGIS install to do so).

I am having an issue with the spatial widgets in CKAN and this might be related, working with the CKAN people to get that sorted, will update here when necessary.

The error (also below) is: [('Dataset schema (gmx.xsd) Validation Error', None), (u"Element '{http://www.isotc211.org/2005/gmd}statement': Character content other than whitespace is not allowed because the content type is 'element-only'.", 512)]

The layer is this: http://geoclean.mountbatten.net/catalogue/csw?outputschema=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2Fcsdgm&service=CSW&request=GetRecordById&version=2.0.2&elementsetname=full&id=f111fa26-932c-11e3-a8cd-45a8d8ef8ca6

The CKAN logs say:

T2014-02-17 12:38:25,002 INFO  [ckanext.harvest.queue] Received harvest object id: 3ba31998-9f95-42ec-be8f-f017b164c13a
2014-02-17 12:38:25,013 DEBUG [ckanext.spatial.harvesters.csw.CSW.fetch] CswHarvester fetch_stage for object: 3ba31998-9f95-42ec-be8f-f017b164c13a
2014-02-17 12:38:25,048 INFO  [ckanext.spatial.lib.csw_client] Making CSW request: getrecordbyid [u'f111fa26-932c-11e3-a8cd-45a8d8ef8ca6'] {'esn': 'full', 'outputschema': 'http://www.isotc211.org/2005/gmd'}
2014-02-17 12:38:25,105 DEBUG [ckanext.spatial.harvesters.csw.CSW.fetch] XML content saved (len 25811)
2014-02-17 12:38:25,110 DEBUG [ckanext.spatial.harvesters.base.import] Import stage for harvest object: 3ba31998-9f95-42ec-be8f-f017b164c13a
2014-02-17 12:38:25,115 DEBUG [ckanext.spatial.validation.validation] Starting validation against profile(s) iso19139
2014-02-17 12:38:25,144 INFO  [ckanext.spatial.validation.validation] Validation errors found using schema Dataset schema (gmx.xsd)
2014-02-17 12:38:25,146 INFO  [ckanext.spatial.validation.validation] Validating against "ISO19139 XSD Schema" profile failed
2014-02-17 12:38:25,147 DEBUG [ckanext.spatial.validation.validation] [('Dataset schema (gmx.xsd) Validation Error', None), (u"Element '{http://www.isotc211.org/2005/gmd}statement': Character content other than whitespace is not allowed because the content type is 'element-only'.", 512)]
2014-02-17 12:38:25,147 ERROR [ckanext.spatial.harvesters.base] Validation errors found using profile iso19139 for object with GUID f111fa26-932c-11e3-a8cd-45a8d8ef8ca6
2014-02-17 12:38:25,149 DEBUG [ckanext.harvest.harvesters.base] Dataset schema (gmx.xsd) Validation Error
2014-02-17 12:38:25,153 DEBUG [ckanext.harvest.harvesters.base] Element '{http://www.isotc211.org/2005/gmd}statement': Character content other than whitespace is not allowed because the content type is 'element-only'., line 512
2014-02-17 12:38:25,413 DEBUG [ckanext.spatial.plugin] Received: '{"type": "Polygon", "coordinates": [[[29.5727423617, -1.47879350588], [35.0003080361, -1.47879350588], [35.0003080361, 4.2340766311], [29.5727423617, 4.2340766311], [29.5727423617, -1.47879350588]]]}'
2014-02-17 12:38:25,414 DEBUG [ckanext.spatial.lib] Created new extent for package 20a27584-7a2e-4b8a-ae23-e9aa62330219
2014-02-17 12:38:25,552 DEBUG [ckanext.archiver.plugin] Notified of resource event: f131cb33-7f43-4530-8c7f-b6c587fd1e37
2014-02-17 12:38:25,566 DEBUG [ckanext.archiver.plugin] Archival of resource put into celery queue: f131cb33-7f43-4530-8c7f-b6c587fd1e37 url=u'http://geoclean.mountbatten.net/geoserver/wfs?typename=geonode%3Apoverty_density&outputFormat=csv&version=1.0.0&request=GetFeature&service=WFS' user=http://ckanclean.mountbatten.net site_user=http://ckanclean.mountbatten.net site_url=http://ckanclean4.mountbatten.net
tomkralidis commented 10 years ago

Thanks for the report. Fixed in master in 4593e82e81b9cea729fd5e3a02d1e3aab55f6b62. Can you try and let me know if this works for you?

batje commented 10 years ago

Yes, this worked. (sorry for the delay)