Skip to content

Commit

Permalink
prioritize objects by smallest area before intersecting
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Oct 28, 2019
1 parent 8d553c7 commit 4aa3461
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/buildSpatialObject.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ buildSpatialObject <- function(item, lang, host, domain,
}
if(length(sp.list) > 1){

#prioritize by area
sp.list <- sp.list[order(sapply(sp.list, gArea))]

if(verbose){
logger.info("Geoprocessing sequential intersection...")
logger.info(sprintf("Sequential intersection with %s (%s intersections)",length(sp.list), length(sp.list)-1))
Expand Down

0 comments on commit 4aa3461

Please sign in to comment.