Open tbonfort opened 12 years ago
Author: dmorissette Date: 2004/12/14 - 18:35
Frank, could this be supported directly at the OGR level by adding a way to
filter by geometry types in OGR's SQL? This might be useful outside of MapServer
as well. By using this with the "WHERE ..." passthru that's being added in bug
1126 we could achieve what Emil needs without any custom change to MapServer.
Author: taatuut@planet.nl Date: 2004/12/20 - 18:59
Would be nice if this can be implemented at OGR level and used in MapServer.
The possibility to query the geometry type in OGR looks like a valuable
enhancement to me.
Author: bartvde@osgis.nl Date: 2005/05/09 - 16:11
There is no mechanism currently for querying based on geometry
type in MapServer or OGR. I briefly looked into adding some sort
of capability to do this in OGR but it seems pretty involved. It could
be hacked into the OGR connector for MapServer pretty easiliy
though. Something along the lines of a PROCESSING directive
that only works for connection type OGR.
You might want to file an enhancement request to this effect.
Keep in mind that it wouldn't be terrible efficient since it would
need to scan the source layer once for each map layer, just
discarding features with the wrong geometry type once they have
been read.
Author: bartvde@osgis.nl Date: 2005/05/09 - 17:07
Frank,
how much effort approximately would be involved in realizing this?
Bart
Author: fwarmerdam Date: 2005/05/09 - 17:27
Bart,
A PROCESSING directive based approach in MapServer would likely only be
one hour of work, perhaps two with a test case and documentation.
An OGR SQL based solution would be more like a day or two of work.
I would be happy to go ahead and do the processing directive for free,
but I am a bit worried that it is a hack solution.
Author: bartvde@osgis.nl Date: 2005/05/09 - 19:35
Hi Frank,
the processing directive would do the trick for us. I would be happy to test.
I do agree with you that an OGR SQL option would be the nicest, but I don't
consider the PROCESSING OPTION a hack. Since this could even apply to Oracle
Spatial or PostGIS layers theoretically, which would make a PROCESSING directive
more logical.
Would this require changes to both Mapserver and OGR?
Bart
Author: fwarmerdam Date: 2005/05/09 - 19:54
Bart,
The processing directive would only require changes in the mapogr.cpp portion
of MapServer. If it were to be applied to other datasources, the appropriate
other modules would also need similar changes.
Author: bartvde@osgis.nl Date: 2005/05/09 - 20:13
Hi Frank,
if you could make those changes to mapogr.cpp I would be so thankful.
I just realized that with spatial databases one would probably create a view for
the specific geometry type, but anyway, I am okay with the PROCESSING option and
don't consider it a hack.
Best regards,
Bart
Author: fwarmerdam Date: 2005/09/28 - 15:58
This issue is also addressed in bug 1438
Author: bartvde@osgis.nl Date: 2005/10/24 - 09:41
Frank, any chance of getting this one into the 4.8 release?
Author: fwarmerdam Date: 2005/10/24 - 20:09
Bart,
I think I would use the approach proposed in bug 1438 which is actually
in OGR instead of MapServer. However, there were several things I
wanted to generalize from the proposed patch and it has fallen to a
back-burner. I have no planned time table for addressing it.
Best regards,
Author: szekerest Date: 2006/02/01 - 23:30
Frank,
Have you managed to step forward with this issue?
Tamas
Author: fwarmerdam Date: 2006/02/02 - 20:28
No, I have not made any progress on this issue.
Author: szekerest Date: 2007/03/16 - 22:31
This feature has been implemented in gdal 1.4.0 as described at
http://www.gdal.org/ogr/ogr_sql.html#ogr_sql_special_fields
Closing this bug
Reporter: taatuut@planet.nl Date: 2004/12/14 - 15:27