Opened 20 years ago
Closed 17 years ago
#770 closed enhancement (fixed)
MapServer/GEOS integration
Reported by: | sdlime | Owned by: | sdlime |
---|---|---|---|
Priority: | high | Milestone: | 4.6 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | minor | Keywords: | |
Cc: | sgillies@… |
Description (last modified by )
A tracker for integrating MapServer and GEOS. To date I've got skeletal code in place, and the build environment all configured. Nothing has been checked in yet... Steve
Attachments (1)
Change History (12)
comment:2 by , 20 years ago
Status: | new → assigned |
---|
Your loss I guess... ;-) It'll be awhile before I can get back to that code seriously though...
comment:3 by , 19 years ago
Made large strides with this today. I have most simple conversions working although I do need to work on collections (multi-point/line/polygon) and MapServer polygons to GEOS in general. MapServer is very (too?) flexible so polygons will be tricky. However, I've tested with simple points and line strings and it works nicely. At this point the only exposed method is for buffering via MapScript. So you can do stuff like: $point = new mapscript::pointObj(); $line = new mapscript::lineObj(); $shape = new mapscript::shapeObj($mapscript::MS_SHAPE_LINE); $point->{x} = 50; $point->{y} = 50; $line->add($point); $point->{x} = 100; $point->{y} = 90; $line->add($point); $point->{x} = 90; $point->{y} = 150; $line->add($point); $point->{x} = 30; $point->{y} = 180; $line->add($point); $point->{x} = 150; $point->{y} = 220; $line->add($point); $shape->add($line); $map = new mapscript::mapObj('buffer.map') or die 'could not load map'; $buffered_shape = $shape->buffer(20) or die 'buffer failed'; $layer = $map->getLayerByName('buffer') or die 'could not get layer'; $layer->{status} = $mapscript::MS_ON; $layer->addFeature($buffered_shape); $layer = $map->getLayerByName('nobuffer') or die 'could not get layer'; $layer->{status} = $mapscript::MS_ON; $layer->addFeature($shape); $image = $map->draw(); $image->save('test.gif'); Pretty slick. Could query, save or whatever now with that new shape. Ton's of possibilities... Steve
comment:4 by , 19 years ago
Steve, we need to think about what it means to be adding GEOS-only methods into mapscript. Howard's windows builds are failing. I've tried hard to keep mapserver macros (like USE_GEOS) out of the SWIG interface files because of the extra complexity that adds to mapscript compilation. It's better to keep all that isolated in libmap. I think that you should be making stubs for the functions in mapgoes.cpp that raise errors when GEOS support isn't available. Like the various OWS and SLD functions do.
comment:5 by , 19 years ago
They do raise errors as with other modules, check for yourself. The msGEOSBuffer and msGEOSConvexHull functions are there and valid regardless of the presence of GEOS support. There must be something else going on... Steve
comment:6 by , 19 years ago
Cc: | added |
---|
comment:7 by , 19 years ago
Milestone: | → 4.6 release |
---|
comment:8 by , 19 years ago
blocked: | → 1327 |
---|
comment:9 by , 19 years ago
Steve, I created bug 1327 about adding the new mapscript methods to PHP MapScript. When you add new GEOS methods, can you please list them in that bug.
comment:10 by , 18 years ago
Cc: | added |
---|
comment:11 by , 17 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
This is long complete...
Steve
Note:
See TracTickets
for help on using tickets.