Skip to content

Commit

Permalink
Fix writing of multiple geolocationpolygons
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Mar 25, 2021
1 parent 9b21c36 commit 4654e8d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/bolognese/datacite_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,14 @@ def insert_geo_locations(xml)
xml.northBoundLatitude(geo_location.dig("geoLocationBox", "northBoundLatitude"))
end
end

if geo_location["geoLocationPolygon"]
xml.geoLocationPolygon do
geo_location["geoLocationPolygon"].each do |polygon_point|
xml.polygonPoint do
xml.pointLatitude(polygon_point["pointLatitude"])
xml.pointLongitude(polygon_point["pointLongitude"])
geo_location["geoLocationPolygon"].each do |geo_location_polygon|
xml.geoLocationPolygon do
geo_location_polygon.each do |polygon_point|
xml.polygonPoint do
xml.pointLatitude(polygon_point.dig("polygonPoint", "pointLatitude"))
xml.pointLongitude(polygon_point.dig("polygonPoint", "pointLongitude"))
end
end
end
end
Expand Down

0 comments on commit 4654e8d

Please sign in to comment.