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

schema: add locations #234

Merged
merged 2 commits into from
Nov 11, 2020
Merged

schema: add locations #234

merged 2 commits into from
Nov 11, 2020

Conversation

ppanero
Copy link
Member

@ppanero ppanero commented Oct 26, 2020

Requires marshmallow-utils GeoJSONSchema merge and release inveniosoftware/marshmallow-utils#21
Closes #231

Important notes

  • The ES mappings coordinates field inside the geometry is of typefloat, however it correctly stores the locations for both point and multipoint
"coordinates": {
    "type": "float"
}

indexed:

"locations" : [
              {
                "geometry" : {
                  "type" : "point",
                  "coordinates" : [
                    3.5480075,
                    165.577299
                  ]
                },
                "identifiers" : {
                  "wikidata" : "12345abcde",
                  "geonames" : "12345abcde"
                },
                "place" : "Naga",
                "description" : "Random place on land..."
              },
              {
                "geometry" : {
                  "type" : "multipoint",
                  "coordinates" : [
                    [
                      1.973974,
                      49.308415
                    ],
                    [
                      -9.508502,
                      -21.08845
                    ]
                  ]
                },
                "place" : "Losheim"
              }
            ],

@ppanero ppanero force-pushed the geojson branch 2 times, most recently from b2946b8 to 2f5ca72 Compare November 10, 2020 14:05
@ppanero ppanero marked this pull request as ready for review November 10, 2020 14:05
@lnielsen lnielsen merged commit fe4e8c6 into inveniosoftware:master Nov 11, 2020
@ppanero ppanero deleted the geojson branch November 11, 2020 07:37
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

Successfully merging this pull request may close these issues.

data model: support GeoJSON for geometry locations
2 participants