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

Handle incorrectly-specified LinearRing coordinates #8

Open
orlade opened this issue Jan 26, 2015 · 3 comments
Open

Handle incorrectly-specified LinearRing coordinates #8

orlade opened this issue Jan 26, 2015 · 3 comments
Assignees
Milestone

Comments

@orlade
Copy link

orlade commented Jan 26, 2015

When a LinearRing's <coordinates> tag is malformed using additional commas instead of spaces (i.e. x,y,z,x,y,z,x,y,z,... instead of x,y,z x,y,z x,y,z ...), JAK simply returns a list with only the first point.

That behaviour is fair enough, but it would be nice if it could either parse the malformed data or throw an exception, since returning a single point is technically incorrect and makes it harder to catch data errors.

Google Earth and other apps parse that malformed data correctly, so perhaps it's not so uncommon? A subset of the file I'm working with is:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>malformed sample</name>
    <open>1</open>
    <description>20150015_182600_walkability</description>
    <Folder>
      <name>Convex hulls</name>
      <description>Convex hulls</description>
      <Placemark>
        <name>Convex hull</name>
        <description>14min</description>
        <Polygon>
          <tessellate>1</tessellate>
          <outerBoundaryIs>
            <LinearRing>
              <coordinates>
                144.92556815,-37.75302462,0,144.92250866,-37.75137202,0,144.91917398,-37.74918087,0,144.91607408,-37.74220241,0,144.92396822,-37.73528384,0,144.92542654,-37.73525344,0,144.93609834,-37.74142729,0,144.93865024,-37.74562287,0,144.93879371,-37.74586098,0,144.93115197,-37.75120675,0,144.93001997,-37.75173478,0,144.92556815,-37.75302462,0
              </coordinates>
            </LinearRing>
          </outerBoundaryIs>
        </Polygon>
      </Placemark>
    </Folder>
  </Document>
</kml>
@ZiglioUK
Copy link
Contributor

Interesting, if there's a way to express that in the XML schema, it should straightforward to convert it to code using the tools

@mischah
Copy link
Collaborator

mischah commented Feb 21, 2016

Sorry, this project is not actively maintained 😔

See #18 for further information.

@laubfall laubfall added this to the 2.3 milestone Dec 28, 2017
@urbancamo urbancamo self-assigned this Nov 21, 2023
@urbancamo urbancamo reopened this Nov 21, 2023
@urbancamo
Copy link
Owner

I'll look into this...

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

When branches are created from issues, their pull requests are automatically linked.

5 participants