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

[Feature request]: BBOX #5

Open
5 tasks done
Peter-van-Tol opened this issue Jul 8, 2024 · 0 comments
Open
5 tasks done

[Feature request]: BBOX #5

Peter-van-Tol opened this issue Jul 8, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Peter-van-Tol
Copy link
Owner

Initial Checks

  • I have searched Google & GitHub for similar requests and couldn't find anything
  • I have read the documentation and couldn't find anything
  • The feature request is limited to combining Pydantic, Shapely and GeoJSON

Description

According to GeoJSON specification

A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries.

The "bbox" values define shapes with edges that follow lines of constant longitude, latitude, and elevation.

Example of a 2D bbox member on a Feature:

   {
       "type": "Feature",
       "bbox": [-10.0, -10.0, 10.0, 10.0],
       "geometry": {
           "type": "Polygon",
           "coordinates": [
               [
                   [-10.0, -10.0],
                   [10.0, -10.0],
                   [10.0, 10.0],
                   [-10.0, -10.0]
               ]
           ]
       }
       //...
   }

Example of a 2D bbox member on a FeatureCollection:

   {
       "type": "FeatureCollection",
       "bbox": [100.0, 0.0, 105.0, 1.0],
       "features": [
       //...
       ]
   }

Example of a 3D bbox member with a depth of 100 meters:

   {
       "type": "FeatureCollection",
       "bbox": [100.0, 0.0, -100.0, 105.0, 1.0, 0.0],
       "features": [
       //...
       ]
   }

Affected Components

  • GeometryField, including supported types, validation, and serialization.
  • GeoJSON export and import
@Peter-van-Tol Peter-van-Tol added the enhancement New feature or request label Jul 8, 2024
@Peter-van-Tol Peter-van-Tol self-assigned this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

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

1 participant