Skip to content

Commit

Permalink
2.4.1 release, fixes and closes #304
Browse files Browse the repository at this point in the history
  • Loading branch information
djtfmartin committed Jan 8, 2019
1 parent 58bc7ba commit dda875f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>au.org.ala</groupId>
<artifactId>biocache-store</artifactId>
<version>2.4.1-SNAPSHOT</version>
<version>2.4.1</version>
<url>https://biocache.ala.org.au</url>
<issueManagement>
<system>GitHub</system>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class LocationProcessor extends Processor {
var sourceEpsgCode = GridUtil.lookupEpsgCode(datum)

//if empty - try verbatim SRS
if (!sourceEpsgCode.isEmpty && verbatimSRS != null) {
if (sourceEpsgCode.isEmpty && verbatimSRS != null) {
val matchedVerbatimSRS = GeodeticDatum.matchTerm(verbatimSRS)
val srs = if(!matchedVerbatimSRS.isEmpty){
matchedVerbatimSRS.get.canonical
Expand Down
27 changes: 27 additions & 0 deletions src/test/scala/au/org/ala/biocache/ProcessLocationTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -932,4 +932,31 @@ class ProcessLocationTest extends ConfigFunSuite with BeforeAndAfterAll {
qas.find(_.getName == "locationNotSupplied").get.qaStatus
}
}

test("Check verbatimDatum does not override the geodeticDatum") {
val raw = new FullRecord
val processed = new FullRecord
processed.classification.setScientificName("Macropus rufus")
processed.classification.setTaxonRankID("7000")
raw.location.decimalLatitude = "-43.36697"
raw.location.decimalLongitude = "145.78746"
raw.location.geodeticDatum = "WGS84"

raw.location.verbatimLatitude = "43°22'06\" S"
raw.location.verbatimLongitude = "145°47'11\" E"
raw.location.verbatimSRS = "EPSG:4202"
raw.rowKey = "test"

val assertions = (new LocationProcessor).process("test", raw, processed)

expectResult("EPSG:4326") {
processed.location.geodeticDatum
}
expectResult("-43.36697") {
processed.location.decimalLatitude
}
expectResult("145.78746") {
processed.location.decimalLongitude
}
}
}

0 comments on commit dda875f

Please sign in to comment.