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

Add LatLonBoundingBox for root layer #19

Merged
merged 6 commits into from Jan 28, 2013
Merged

Add LatLonBoundingBox for root layer #19

merged 6 commits into from Jan 28, 2013

Conversation

perliedman
Copy link
Contributor

Adds a LatLonBoundingBox element to the root layer in the GetCapabilities response for WMS 1.1.1, and an equivalent EX_GeographicBoundingBox element for WMS 1.3.0.

According to the WMS 1.1.1 (section 7.1.4.5.6) specification:

"Every Layer shall have exactly one element that is either stated
explicitly or inherited from a parent Layer."

The 1.3.0 spec contains a similar section (7.2.4.6.6).

We have a customer with a WMS client (DigPro) that is kind of picky and apparently refuses to work correctly if this element is missing.

@springmeyer
Copy link
Member

Awesome, thanks for the patch. On first glance it looks incompatible with Mapnik >= 2 due to direct Envelope import. Also would be really great to add some basic tests. /cc @manelclos who may have more guidance on tests.

@perliedman
Copy link
Contributor Author

I'm pretty sure I'm running mapnik 2 - at least I'm running TileMill on the same machine. Also, importing mapnik2 gives me this message, which I guess means I'm running >2.0 if I understand the situation correctly:

 DeprecationWarning:  mapnik2 module has been deprecated,
        please use 'import mapnik'

Is it better to use Box2D, or what is the preferred alternative to using Envelope the way I'm doing now?

@perliedman
Copy link
Contributor Author

Regarding tests, is there some documentation on how to run them? I installed nose and had a go at running the current tests, but I didn't find any obvious way to run them without all of them failing because of not finding files, etc.

Just a single command line would be plenty, I guess.

@perliedman
Copy link
Contributor Author

I've added a test to verify the existence of LatLonBoundingBox (1.1.1) and EX_GeographicBoundingBox (1.3.0) in the root layer.

I also added the file empty.dbf, that seemed to be missing and prevented me from running the old tests without errors, I guess it was forgot when the tests were committed earlier; note that my current commit is just a copy of shape_iso8859-1_col.dbf, which I guess isn't right, but at least the tests passes now.

springmeyer pushed a commit that referenced this pull request Jan 28, 2013
Add LatLonBoundingBox for root layer
@springmeyer springmeyer merged commit 7f7cdf1 into mapnik:master Jan 28, 2013
@springmeyer
Copy link
Member

Thanks! I sense @manelclos may not be around right now so I went ahead and merged. Hopefully he can coment on the test issue you found.

@perliedman perliedman deleted the root-latlonbbox branch January 29, 2013 09:22
@manelclos
Copy link
Member

Hi! I can't find the original .dbf file, maybe it never existed. The code and the tests look great, Thanks!

@springmeyer
Copy link
Member

Thanks for following up @manelclos

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

Successfully merging this pull request may close these issues.

None yet

3 participants