AtlasOfLivingAustralia / biocache-service

Occurrence & mapping webservices
https://biocache-ws.ala.org.au/ws/
Other
9 stars 26 forks source link

Failed occurrence records DwC as shapefile download #182

Closed reupost closed 2 years ago

reupost commented 6 years ago

I'm having an issue with downloading full DwC format occurrence records in shapefile format. This noted on the NBN Atlas (UK).

For example, for this download:

https://records-ws.nbnatlas.org/occurrences/offline/download?file=records-2018-01-12&fields=type%2Clanguage%2Clicense%2Crightsholder%2Crights%2CbibliographicCitation%2Ccitation%2Creferences%2CinstitutionID%2CcollectionID%2CdatasetID%2CinstitutionCode%2CcollectionCode%2CdatasetName%2CownerInstitutionCode%2CdynamicProperties%2CoccurrenceID%2CcatalogNumber%2CrecordNumber%2CindividualCount%2CorganismQuantity%2CorganismQuantityType%2Csex%2ClifeStage%2Cbehavior%2Cpreparations%2Cdisposition%2CassociatedMedia%2CassociatedReferences%2CassociatedSequences%2CassociatedTaxa%2CotherCatalogNumbers%2CoccurrenceRemarks%2CorganismID%2CorganismName%2CorganismScope%2CassociatedOrganisms%2CpreviousIdentifications%2CorganismRemarks%2CmaterialSampleID%2CeventID%2CparentEventID%2CfieldNumber%2CeventTime%2CstartDayOfYear%2CendDayOfYear%2CverbatimEventDate%2CsamplingEffort%2CsampleSizeUnit%2CfieldNotes%2CeventRemarks%2ClocationId%2ChigherGeographyID%2ChigherGeography%2Ccontinent%2CwaterBody%2CislandGroup%2Cisland%2CcountryCode%2Ccounty%2Cmunicipality%2CverbatimLocality%2CminimumDistanceAboveSurfaceInMeters%2CmaximumDistanceAboveSurfaceInMeters%2ClocationAccordingTo%2ClocationRemarks%2CpointRadiusSpatialFit%2CverbatimCoordinates%2CverbatimLatitude%2CverbatimLongitude%2CverbatimCoordinateSystem%2CverbatimSRS%2CfootprintWKT%2CfootprintSRS%2CfootprintSpatialFit%2CgeoreferenceRemarks%2CgeologicalContextID%2CearliestEonOrLowestEonothem%2ClatestEonOrHighestEonothem%2CearliestEraOrLowestErathem%2ClatestEraOrHighestErathem%2CearliestPeriodOrLowestSystem%2ClatestPeriodOrHighestSystem%2CearliestEpochOrLowestSeries%2ClatestEpochOrHighestSeries%2CearliestAgeOrLowestStage%2ClatestAgeOrHighestStage%2ClowestBiostratigraphicZone%2ChighestBiostratigraphicZone%2ClithostratigraphicTerms%2Cgroup%2Cformation%2Cmember%2Cbed%2CidentificationID%2CidentificationQualifier%2CidentificationVerificationStatus%2CidentificationRemarks%2CtaxonID%2CscientificNameID%2CacceptedNameUsageID%2CparentNameUsageID%2CoriginalNameUsageID%2CnameAccordingToID%2CnamePublishedInID%2CacceptedNameUsage%2CparentNameUsage%2CoriginalNameUsage%2CnamePublishedIn%2CnamePublishedInYear%2ChigherClassification%2Cclasss%2Csubgenus%2CspecificEpithet%2CinfraspecificEpithet%2CverbatimTaxonRank%2CscientificNameAuthorship%2CtaxonomicStatus%2CnomenclaturalStatus%2CtaxonRemarks%2CmeasurementDeterminedDate%2CrelationshipAccordingTo%2CresourceRelationshipID%2CmeasurementRemarks%2CmeasurementValue%2CrelationshipRemarks%2CresourceID%2CrelationshipEstablishedDate%2CrelationshipOfResource%2CmeasurementMethod%2CmeasurementID%2CmeasurementType%2CmeasurementUnit%2CmeasurementDeterminedBy%2CmeasurementAccuracy%2CrelatedResourceID&reasonTypeId=10&dwcHeaders=true&fileType=shapefile&email=r.roberts%40nbn.org.uk&qa=none&q=malus

I get an email stating that the download failed.

The /var/log/tomcat7/biocache-service.log seems to contain the following explanation:

2018-01-12 06:06:46,864 [org.ala.biocache.writer.ShapeFileRecordWriter] The invalid header...type|language|license|rightsholder|rights|bibliographicCitation|citation|references|institutionID|collectionID|datasetID|institutionCode|collectionCode|datasetName|ownerInstitutionCode|dynamicProperties|occurrenceID|catalogNumber|recordNumber|individualCount|organismQuantity|organismQuantityType|sex|lifeStage|behavior|preparations|disposition|associatedMedia|associatedReferences|associatedSequences|associatedTaxa|otherCatalogNumbers|occurrenceRemarks|organismID|organismName|organismScope|associatedOrganisms|previousIdentifications|organismRemarks|materialSampleID|eventID|parentEventID|fieldNumber|eventTime|startDayOfYear|endDayOfYear|verbatimEventDate|samplingEffort|sampleSizeUnit|fieldNotes|eventRemarks|locationId|higherGeographyID|higherGeography|continent|waterBody|islandGroup|island|countryCode|county|municipality|verbatimLocality|minimumDistanceAboveSurfaceInMeters|maximumDistanceAboveSurfaceInMeters|locationAccordingTo|locationRemarks|pointRadiusSpatialFit|verbatimCoordinates|verbatimLatitude|verbatimLongitude|verbatimCoordinateSystem|verbatimSRS|footprintWKT|footprintSRS|footprintSpatialFit|georeferenceRemarks|geologicalContextID|earliestEonOrLowestEonothem|latestEonOrHighestEonothem|earliestEraOrLowestErathem|latestEraOrHighestErathem|earliestPeriodOrLowestSystem|latestPeriodOrHighestSystem|earliestEpochOrLowestSeries|latestEpochOrHighestSeries|earliestAgeOrLowestStage|latestAgeOrHighestStage|lowestBiostratigraphicZone|highestBiostratigraphicZone|lithostratigraphicTerms|group|formation|member|bed|identificationID|identificationQualifier|identificationVerificationStatus|identificationRemarks|taxonID|scientificNameID|acceptedNameUsageID|parentNameUsageID|originalNameUsageID|nameAccordingToID|namePublishedInID|acceptedNameUsage|parentNameUsage|originalNameUsage|namePublishedIn|namePublishedInYear|higherClassification|classs|subgenus|specificEpithet|infraspecificEpithet|verbatimTaxonRank|scientificNameAuthorship|taxonomicStatus|nomenclaturalStatus|taxonRemarks|measurementDeterminedDate|relationshipAccordingTo|resourceRelationshipID|measurementRemarks|measurementValue|relationshipRemarks|resourceID|relationshipEstablishedDate|relationshipOfResource|measurementMethod|measurementID|measurementType|measurementUnit|measurementDeterminedBy|measurementAccuracy|relatedResourceID 2018-01-12 06:06:46,866 [org.ala.biocache.service.DownloadService] Error in offline download, sending email. download path: /data/biocache-download/4396fa98-efb3-37da-b278-701793f68273/1515737206809/records-2018-01-12.zip java.lang.IllegalArgumentException: A Shape File Export needs to include latitude and longitude in the headers. at au.org.ala.biocache.writer.ShapeFileRecordWriter.(ShapeFileRecordWriter.java:113) at au.org.ala.biocache.dao.SearchDAOImpl.writeResultsToStream(SearchDAOImpl.java:1724)

Is this possibly something we've misconfigured? I've tested with other genera/species downloads, and with a spatial query, and it triggers the same error.

djtfmartin commented 2 years ago

Closing historic issue. If this is still a problem, please reopen.