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

Multipolygons not supported #10

Open
mwillumz opened this issue Nov 25, 2013 · 3 comments
Open

Multipolygons not supported #10

mwillumz opened this issue Nov 25, 2013 · 3 comments

Comments

@mwillumz
Copy link

Looking quickly through your source it appears that Multipolygon support is intended... but it appears not to work

see before and after:
https://github.com/will0955/hmda/blob/master/States.geojson
http://gitspatial.com/api/v1/will0955/hmda/States.geojson

@JasonSanford
Copy link
Owner

Seeing lots of stuff like this in the logs. It looks like GEOS expects linestrings to have a matching start/end point.

https://gist.github.com/JasonSanford/01568d9ba730a1c18431

@JasonSanford
Copy link
Owner

The following GeoJSON was seen in the logs. This does not seem valid to me as each ring in the multipolygon only has 2 vertices:

{
    "type": "MultiPolygon",
    "coordinates": [
        [
            [
                [
                    -160.506927,
                    55.32773
                ],
                [
                    -160.819487,
                    55.187457
                ]
            ]
        ],
        [
            [
                [
                    -165.790523,
                    54.171758
                ],
                [
                    -165.671477,
                    54.096235
                ]
            ]
        ],
        [
            [
                [
                    -165.721389,
                    60.16962
                ],
                [
                    -165.575815,
                    59.904672
                ]
            ]
        ],
        [
            [
                [
                    -134.713987,
                    58.220748
                ],
                [
                    -134.18937,
                    58.083444
                ]
            ]
        ],
        [
            [
                [
                    -169.267598,
                    63.343995
                ],
                [
                    -168.686675,
                    63.293022
                ]
            ]
        ],
        [
            [
                [
                    -134.121514,
                    56.069847
                ],
                [
                    -134.230449,
                    56.068341
                ]
            ]
        ],
        [
            [
                [
                    -132.546463,
                    56.606563
                ],
                [
                    -132.818043,
                    56.494934
                ]
            ]
        ],
        [
            [
                [
                    -131.56956,
                    55.284114
                ],
                [
                    -131.39769,
                    55.210916
                ]
            ]
        ],
        [
            [
                [
                    -133.344847,
                    55.569327
                ],
                [
                    -133.419384,
                    55.386105
                ]
            ]
        ],
        [
            [
                [
                    -133.624918,
                    56.343906
                ],
                [
                    -133.163212,
                    56.317445
                ]
            ]
        ],
        [
            [
                [
                    -135.587961,
                    57.89732
                ],
                [
                    -135.201461,
                    57.728171
                ]
            ]
        ],
        [
            [
                [
                    -134.666587,
                    56.169947
                ],
                [
                    -134.806163,
                    56.235533
                ]
            ]
        ],
        [
            [
                [
                    -147.562801,
                    60.579821
                ],
                [
                    -147.618906,
                    60.368848
                ]
            ]
        ],
        [
            [
                [
                    -147.217704,
                    60.293504
                ],
                [
                    -147.002067,
                    60.232453
                ]
            ]
        ],
        [
            [
                [
                    -176.762478,
                    51.867878
                ],
                [
                    -176.290728,
                    51.872136
                ]
            ]
        ],
        [
            [
                [
                    177.601645,
                    52.016377
                ],
                [
                    177.560513,
                    51.916364
                ]
            ]
        ],
        [
            [
                [
                    179.758993,
                    51.946595
                ],
                [
                    179.614364,
                    51.871772
                ]
            ]
        ],
        [
            [
                [
                    -174.301818,
                    52.278949
                ],
                [
                    -174.324935,
                    52.378095
                ]
            ]
        ],
        [
            [
                [
                    172.763366,
                    52.823656
                ],
                [
                    172.629077,
                    53.001324
                ]
            ]
        ],
        [
            [
                [
                    -168.211705,
                    53.256184
                ],
                [
                    -168.49749,
                    53.035403
                ]
            ]
        ],
        [
            [
                [
                    -166.728918,
                    54.003111
                ],
                [
                    -166.560546,
                    53.878775
                ]
            ]
        ],
        [
            [
                [
                    -154.404015,
                    56.572287
                ],
                [
                    -154.73655,
                    56.403848
                ]
            ]
        ],
        [
            [
                [
                    -152.417424,
                    57.815464
                ],
                [
                    -152.497314,
                    57.738596
                ]
            ]
        ],
        [
            [
                [
                    -152.24289,
                    58.241192
                ],
                [
                    -152.265111,
                    58.135732
                ]
            ]
        ],
        [
            [
                [
                    -132.977163,
                    56.439673
                ],
                [
                    -132.734466,
                    56.458515
                ]
            ]
        ],
        [
            [
                [
                    -135.447381,
                    58.399891
                ],
                [
                    -135.90731,
                    58.380839
                ]
            ]
        ]
    ]
}

@mwillumz
Copy link
Author

Searched for that first coordinate at
https://raw.github.com/will0955/hmda/master/States.geojson
and had a different (and valid I think) result...

 {
      "type": "Feature",
      "properties": {
        "GEO_ID": "0400000US02",
        "STATE": "02",
        "NAME": "Alaska"
      },
      "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
          [
            [
              [
                -160.506927,
                55.32773
              ],
              [
                -160.819487,
                55.187457
              ],
              [
                -160.797147,
                55.381521
              ],
              [
                -160.506927,
                55.32773
              ]
            ]
          ],
          [
            [
              [
                -165.790523,
                54.171758
              ],
              [
                -165.671477,
                54.096235
              ],
              [
                -166.046438,
                54.044186
              ],
              [
                -166.112242,
                54.122528
              ],
              [
                -165.9832,
                54.221175
              ],
              [
                -165.790523,
                54.171758
              ]
            ]
          ],
          [
            [
              [
                -165.721389,
                60.16962
              ],
              [
                -165.575815,
                59.904672
              ],
              [
                -166.010201,
                59.847061
              ],
              [
                -166.062854,
                59.748586
              ],
              [
                -166.439746,
                59.857816
              ],
              [
                -166.616849,
                59.850711
              ],
              [
                -166.995748,
                59.993495
              ],
              [
                -167.339109,
                60.070159
              ],
              [
                -167.421489,
                60.205431
              ],
              [
                -166.93797,
                60.20587
              ],
              [
                -166.762522,
                60.309837
              ],
              [
                -166.174906,
                60.401003
              ],
              [
                -166.084791,
                60.325288
              ],
              [
                -165.71451,
                60.310496
              ],
              [
                -165.721389,
                60.16962
              ]
            ]
          ],

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

No branches or pull requests

2 participants