diff --git a/grails-app/services/au/org/ala/ecodata/SiteService.groovy b/grails-app/services/au/org/ala/ecodata/SiteService.groovy index 7e656c58c..663f9017b 100644 --- a/grails-app/services/au/org/ala/ecodata/SiteService.groovy +++ b/grails-app/services/au/org/ala/ecodata/SiteService.groovy @@ -207,7 +207,7 @@ class SiteService { ] Map geojson - if (site.type == Site.TYPE_COMPOUND) { + if (site.features) { geojson = [ type:'FeatureCollection', properties: properties, diff --git a/src/main/groovy/au/org/ala/ecodata/reporting/ShapefileBuilder.groovy b/src/main/groovy/au/org/ala/ecodata/reporting/ShapefileBuilder.groovy index 920ac1fb9..c2d22b664 100644 --- a/src/main/groovy/au/org/ala/ecodata/reporting/ShapefileBuilder.groovy +++ b/src/main/groovy/au/org/ala/ecodata/reporting/ShapefileBuilder.groovy @@ -96,7 +96,7 @@ class ShapefileBuilder { createShapefile() } try { - if (Site.TYPE_COMPOUND == site.type) { + if (site.features) { site.features.each { Map feature -> if (feature.geometry) { Map siteProps = new HashMap(site)