Closed highsource closed 6 years ago
I also saw a srs format (dunno where it's documented) along with the coordinates, eg. in a bbox
minX,minY,maxX,maxY,srs-in-a-format-I-don't-remember
@cyrilchapon Never saw this...
@derhuerst I'm on it right now. Actually a peanuts but tests get a bit... cumbersome.
@highsource Do you mean because they're quite verbose? I think we can introduce some helper functions – but don't make the tests more complex than the code, that defeats their point.
I wrote a few tests to check that srsDimension
propagates correctly via ctx
/childCtx
.
Since srsDimension
can be specified on almost any level, this makes combinatorics explode.
I'm not quite sure how to go about it.
I guess just have one test for propagation. I wouldn't aim for "test every edge case out there", but rather "test complex/likely edge cases and add more tests later".
@cyrilchapon Never saw this...
I'm hard looking for that example. I'll come back
@cyrilchapon I'm not saying your case is rare, I don't know if it is.
But the question regarding weird edge cases in general is how much we want to cover. As long as our library is easily adaptable, covering 99.9% of the edge cases won't be necessary.
@cyrilchapon Please don't get me wrong here, but I'm with @derhuerst. I think we should prioritize the cases. If something is too rare or not so common, I'd suggest skipping it for a moment. If someone needs it, they should at least supply the test case.
To be honest even the srsDimension
handling I'm implementing at the moment looks not so common for me.
Closing as #12 is merged.
Many of the GML elements we process may contain the
SRSReferenceGroup
attribute group. This group contains coordinate system info in attributes likesrsName
andsrsDimension
.Also from the spec:
Basically, nested elements should "inherit"
srsName
andsrsDimension
from outer elements. We do this via context, but at the moment only inPosList
andPos
.We should do it in other elements as well.