Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper skipping of Raster datasource when map.srs != layer.srs #527

Closed
artemp opened this issue Oct 11, 2011 · 7 comments
Closed

Proper skipping of Raster datasource when map.srs != layer.srs #527

artemp opened this issue Oct 11, 2011 · 7 comments
Milestone

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

Until we have proper on-the-fly reprojection support for raster datasources when map and layer srs's don't match it seems like we can skip the featureset being called. Need to look into best place to check for (non)intersection in native srs, whether in feature_style_processor or in datasource...

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] see r1717, needs more thought in trunk.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[albertov] I'd say that a good place to check is at the beginning of [source:trunk/plugins/input/gdal/gdal_featureset.cpp#L79 gdal_featureset::get_feature](assuming the Query carries the srs information). ie: If the srss don't match then return a null feature.

The reason is for doing it here is that we won't need to modify anything but this method when we implement on-the-fly reprojection, the above conditional would change to: If the srss don't match then reproject query.extent into native extent and return reprojected raster.

Sounds sensible?

Alberto

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[albertov] BTW, I think that feature_style_processor already checks for extent intersection with srs-normalized extents, doesn't it? source:/trunk/include/mapnik/feature_style_processor.hpp#L130.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] Replying to [comment:2 albertov]:

I'd say that a good place to check is at the beginning of [source:trunk/plugins/input/gdal/gdal_featureset.cpp#L79 gdal_featureset::get_feature](assuming the Query carries the srs information). ie: If the srss don't match then return a null feature.

The reason is for doing it here is that we won't need to modify anything but this method when we implement on-the-fly reprojection, the above conditional would change to: If the srss don't match then reproject query.extent into native extent and return reprojected raster.

Sounds sensible?

right on, yes sounds sensible. mapnik::query does not currently contain srs or whether map.srs == layer.srs but we could add. I'll look into this after the 0.7.1 release.

  • dane

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] ps. two things:

  1. thanks so much for quick comments on tickets - its awesome as I tend to just stash ideas on tickets for later reference and having quick feedback is invaluable once I get around to clearly thinking about something.

  2. I've got a patch to optimize gdal input in small ways (mainly moving a few more things into class members to we don't have to re query the extent, etc) that gives a slight speedup. I'll add this soon to trunk (it was a patch originally against 0.7).

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] see also crashes in #599

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] artem just addressed this in: r2228

@artemp artemp closed this as completed Oct 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant