Closed jlaura closed 3 years ago
@jlaura, can you provide me an example XML file so I can test your code, and see about fixing the errors or suggesting a change of code?
@dharvey-consbio Absolutely! Thanks. Here is a truncated (but still valid I believe) example:
The section equirect
:
<equirect>
<stdparll>0</stdparll>
<longcm>0</longcm>
<feast>0</feast>
<fnorth>0</fnorth>
</equirect>
can be any one of a number of projections with a varied number of required fields. I am happy to implement equirectangular, and polar stereographic for my current use case. I mention this because I will try to have as generic a solution as possible because we have a number of different projections to support.
Thanks and very happy to continue the conversation and submit a PR back with changes to support projections. Much appreciate the library!
@jlaura, I'm working on this now. I'm also adding this specific example to the tests. I hope to have something working for you soon. So glad you appreciate the library!
Hi @jlaura,
I was able to get a complex projection data structure to work. I added it to the tests. Here is the commit: https://github.com/consbio/gis-metadata-parser/commit/929e79dd937e427bd1242e901e035b2a8be87c9a
I'm not sure exactly what was amiss in your original code, but you can copy the CustomFgdcParser
class directly from tests.py
for a working example. Please let me know if you encounter any issues.
I'm closing this issue for now, but feel free to reopen if I missed something.
Thanks for taking the time to submit an issue!
I am trying to parse/include projection information in some FGDC metadata. Specifically, the and then projection specific sections.
I have the following working to set the projection name:
I am struggling to set the projection itself inside of the name. Here, I am trying to extend the above in order to get an equirectangular projection defined.
This is throwing key errors trying to get the crs xpath. I also tried defining the mapprojn separate from the projection information, but this resulted in duplicate wrapping keys (specifically the planar one). Does an example exist for nested objects that I can/should follow?
Thanks!