Ticket #2443: wfs-multipoint.patch
| File wfs-multipoint.patch, 5.1 kB (added by pramsey, 7 months ago) |
|---|
-
mappostgis.c
old new 755 755 shape->type = MS_SHAPE_NULL; /* nothing in it */ 756 756 757 757 memcpy(&ngeoms, &wkb[5], 4); 758 offset = 9; /* were the first geometry is */ 758 offset = 9; /* where the first geometry is */ 759 759 760 for(t=0; t < ngeoms; t++) { 760 761 memcpy(&type, &wkb[offset + 1], 4); /* type of this geometry */ 761 762 … … 809 810 } 810 811 } 811 812 } 812 813 813 814 return MS_SUCCESS; 814 815 } 815 816 -
HISTORY.TXT
old new 13 13 Current Version (5.1-dev, SVN trunk): 14 14 ------------------------------------- 15 15 16 - WFS Multipoint query with PostGIS bug fixed (#2443) 17 16 18 - Tiling API (RFC 43) mode=tile, tilemode=spheremerc, tile=x y zoom (#2581) 17 19 18 20 - Remove C++-style comments and most other warnings thrown by -pedantic (#2598) -
mapsearch.c
old new 180 180 return(status); 181 181 } 182 182 183 int msIntersectMultipointPolygon( multipointObj *points, shapeObj *poly) {184 int i ;183 int msIntersectMultipointPolygon(shapeObj *multipoint, shapeObj *poly) { 184 int i,j; 185 185 186 for(i=0; i<points->numpoints; i++) { 187 if(msIntersectPointPolygon(&(points->point[i]), poly) == MS_TRUE) 188 return(MS_TRUE); 186 for(i=0; i<multipoint->numlines; i++ ) { 187 lineObj points = multipoint->line[i]; 188 for(j=0; j<points.numpoints; j++) { 189 if(msIntersectPointPolygon(&(points.point[j]), poly) == MS_TRUE) 190 return(MS_TRUE); 191 } 189 192 } 190 193 191 194 return(MS_FALSE); -
mapserver.h
old new 1559 1559 MS_DLL_EXPORT double msDistanceShapeToShape(shapeObj *shape1, shapeObj *shape2); 1560 1560 MS_DLL_EXPORT int msIntersectSegments(pointObj *a, pointObj *b, pointObj *c, pointObj *d); 1561 1561 MS_DLL_EXPORT int msPointInPolygon(pointObj *p, lineObj *c); 1562 MS_DLL_EXPORT int msIntersectMultipointPolygon( multipointObj *points, shapeObj *polygon);1562 MS_DLL_EXPORT int msIntersectMultipointPolygon(shapeObj *multipoint, shapeObj *polygon); 1563 1563 MS_DLL_EXPORT int msIntersectPointPolygon(pointObj *p, shapeObj *polygon); 1564 1564 MS_DLL_EXPORT int msIntersectPolylinePolygon(shapeObj *line, shapeObj *poly); 1565 1565 MS_DLL_EXPORT int msIntersectPolygons(shapeObj *p1, shapeObj *p2); -
mapquery.c
old new 1 1 /****************************************************************************** 2 * $Id :$2 * $Id$ 3 3 * 4 4 * Project: MapServer 5 5 * Purpose: layer query support. … … 506 506 507 507 shape.classindex = msShapeGetClass(lp, &shape, map->scaledenom, classgroup, nclasses); 508 508 if(!(lp->template) && ((shape.classindex == -1) || (lp->class[shape.classindex]->status == MS_OFF))) { /* not a valid shape */ 509 msFreeShape(&shape);510 continue;509 msFreeShape(&shape); 510 continue; 511 511 } 512 512 513 513 if(!(lp->template) && !(lp->class[shape.classindex]->template)) { /* no valid template */ 514 msFreeShape(&shape);515 continue;514 msFreeShape(&shape); 515 continue; 516 516 } 517 517 518 518 #ifdef USE_PROJ … … 523 523 #endif 524 524 525 525 if(msRectContained(&shape.bounds, &rect) == MS_TRUE) { /* if the whole shape is in, don't intersect */ 526 status = MS_TRUE;526 status = MS_TRUE; 527 527 } else { 528 528 switch(shape.type) { /* make sure shape actually intersects the rect (ADD FUNCTIONS SPECIFIC TO RECTOBJ) */ 529 529 case MS_SHAPE_POINT: 530 status = msIntersectMultipointPolygon(&shape .line[0], &searchshape);530 status = msIntersectMultipointPolygon(&shape, &searchshape); 531 531 break; 532 532 case MS_SHAPE_LINE: 533 533 status = msIntersectPolylinePolygon(&shape, &searchshape); … … 762 762 switch(shape.type) { /* make sure shape actually intersects the selectshape */ 763 763 case MS_SHAPE_POINT: 764 764 if(tolerance == 0) /* just test for intersection */ 765 status = msIntersectMultipointPolygon(&shape .line[0], &selectshape);765 status = msIntersectMultipointPolygon(&shape, &selectshape); 766 766 else { /* check distance, distance=0 means they intersect */ 767 767 distance = msDistanceShapeToShape(&selectshape, &shape); 768 768 if(distance < tolerance) status = MS_TRUE; … … 1159 1159 switch(shape.type) { /* make sure shape actually intersects the shape */ 1160 1160 case MS_SHAPE_POINT: 1161 1161 if(tolerance == 0) /* just test for intersection */ 1162 status = msIntersectMultipointPolygon(&shape .line[0], selectshape);1162 status = msIntersectMultipointPolygon(&shape, selectshape); 1163 1163 else { /* check distance, distance=0 means they intersect */ 1164 1164 distance = msDistanceShapeToShape(selectshape, &shape); 1165 1165 if(distance < tolerance) status = MS_TRUE; … … 1454 1454 { 1455 1455 int i, found=0; 1456 1456 rectObj tmpBounds; 1457 1457 1458 1458 for(i=0; i<map->numlayers; i++) { 1459 1459 1460 layerObj *lp; 1460 1461 lp = (GET_LAYER(map, i)); 1461 1462
