Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions contrib/mapcache_detail/mapcache_detail.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ static void _destroy_json_pool() {
GEOSGeometry * mapcache_extent_to_GEOSGeometry(const mapcache_extent *extent)
{
GEOSCoordSequence *cs = GEOSCoordSeq_create(5,2);
GEOSGeometry *lr = GEOSGeom_createLinearRing(cs);
GEOSGeometry *bb = GEOSGeom_createPolygon(lr,NULL,0);
GEOSGeometry *lr;
GEOSGeometry *bb;

GEOSCoordSeq_setX(cs,0,extent->minx);
GEOSCoordSeq_setY(cs,0,extent->miny);
GEOSCoordSeq_setX(cs,1,extent->maxx);
Expand All @@ -249,6 +250,10 @@ GEOSGeometry * mapcache_extent_to_GEOSGeometry(const mapcache_extent *extent)
GEOSCoordSeq_setY(cs,3,extent->maxy);
GEOSCoordSeq_setX(cs,4,extent->minx);
GEOSCoordSeq_setY(cs,4,extent->miny);

lr = GEOSGeom_createLinearRing(cs);
bb = GEOSGeom_createPolygon(lr, NULL, 0);

return bb;
}

Expand Down