Comments (7)
Perhaps we can follow some open standard like OGC Simple Feature Access
To answer some questions above (Just my opinion)
- Base types: Point, LineString, Polygon; there are also some other types as defined in SFA 6.1 Geometry Object Model
- Hole in polygon is represented as InteriorRing (A LineString). A polygon has only one exterorRing and 0 or multiple interiorRing. So wind order doesn't matter.
- Self intersecting polygons are not supported (? you may check the definition in that document to confirm)
- We don't need to deal with topology in this lib
- (x,y) is required and
z
,m
is optional - GeometryCollection is in this spec
- Projections are out of this library's scope, only numeric coordinates are involved
from geo.
not a bad idea, the way point xy is distinct from point xyz fits well with rust fyi ogc has the same types as geojson (Point,LineString,Polygon,MultiPoint,MultiLineString,MultiPolygon,GeometryCollection) plus a few more (MultiCurve, MultiSurface,Curve, Surface, PolyhedralSurface, TIN).
The GeoJSON and some databases like postgres have a somewhat laxer view on self intersections and what not, then tends to be a bit more practical in the real world.
The OGC spec is awful, the page number are romen numerals for gods sack.
Hemisphere spanning polygons are still a problem
from geo.
SFA GOM is based on a classic object-oriented model, but in rust we prefer composition over inheritance, so we don't need to implement types like Curve, Surface...
I think the shared types of SFA and GeoJSON are in highest priority.
Another reference is JTS geom types. JTS is widely used in Java GIS libraries as foundation. You can find its type system is very practical.
from geo.
Maybe we should open separate GitHub issues to discuss each of these points individually to facilitate better, more organized discussion.
In terms of XYZM, does the M coordinate value ever get used for geospatial calculations like distance and area? After reading this I would think that it wouldn't.
from geo.
yeah m is rarely used, wkb specifically is pretty down to earth and is something we could translate into rust pretty easily
from geo.
Unless I'm looking at this incorrectly, it looks like JTS's distance operation only works on XY even though they offer XYZ (and M).
from geo.
True, seems the whole library doesn't use z for distance: https://github.com/simplegeo/jts/blob/master/src/com/vividsolutions/jts/algorithm/CGAlgorithms.java
from geo.
Related Issues (20)
- Missing `contains` implementations
- `is_valid` for all geometry types. HOT 3
- Problems building with Rust 1.75.0 HOT 1
- Add is_equal_topo method to IntersectionMatrix to determine topological equality
- How to calculate intersection area of two rotated rectangles? HOT 2
- Missing PointZ implementations HOT 1
- Latest ahash dep and Rust 1.70.0 are incompatible HOT 4
- 3D (3-dimensional) data types HOT 2
- Rhumb destinations do not wrap angles after the first pole intersection HOT 8
- GeodesicDestination produces cyclcically incosistent results HOT 5
- Expose fields in AffineTransform struct (or have a way to access the internal values)? HOT 4
- st_makeline function HOT 2
- Helper for converting between Mercator and Euclidean coordinates HOT 1
- getting one of the closest point for `Closest::Indeterminate` HOT 2
- Consider applying for support from OSGEO or OGC?
- Algorithm to partition a polygon (convex decomposition) using the Hertel-Mehlhorn algorithm HOT 1
- Documentation for monotone-decomposition
- Panic on clip operation HOT 2
- Iām confused about the clip API. Could the operations be more clearly documented? HOT 6
- Add a buffer feature like turfjs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geo.