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

Fix GML coordinates and srsName parsing #553

Merged
merged 4 commits into from
Jun 22, 2020

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Jun 22, 2020

  • coordinates element parsing now handles spaces before and after comma separators
  • srsName attribute parsing now extracts the final numeric value as the geometry SRID

Signed-off-by: Martin Davis mtnclimb@gmail.com

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dr-jts dr-jts changed the title Fix GML coordinate string parsing to allow spaces after comma separators Fix GML coordinate string and srsName parsing Jun 22, 2020
* Remove spaces after commas, for when they are used as separators (default).
* This prevents coordinates being split by the tuple separator
*/
t = t.replaceAll(",\\s+", ",");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also handle spaces before comma as well?

<gml:Point gml:id="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
    <gml:coordinates>45.67     ,88.56</gml:coordinates>
 </gml:Point>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, probably should

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

…ma separators

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dr-jts dr-jts changed the title Fix GML coordinate string and srsName parsing Fix GML coordinates and srsName parsing Jun 22, 2020
@dr-jts dr-jts merged commit d48fd3f into locationtech:master Jun 22, 2020
@dr-jts dr-jts deleted the fix-gml-cs-with-space branch June 22, 2020 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants