Understanding geometry vs geography types, and working with WKT, WKB, and GeoJSON formats in StarTree Cloud.
Use Case | Recommended Type | Reason |
---|---|---|
City-wide analysis | Geometry | Fast, sufficient accuracy |
Global applications | Geography | Accurate across all locations |
Small regions (< 100km) | Either | Difference is minimal |
Navigation/GPS data | Geography | Requires precise distances |
Engineering/CAD data | Geometry | Working in projected coordinates |
Function | Purpose | Example |
---|---|---|
ST_GeomFromGeoJson(string) | Create geometry from GeoJSON | Convert GeoJSON to internal format |
ST_GeogFromGeoJson(string) | Create geography from GeoJSON | Same but with spherical calculations |
ST_AsGeoJson(binary) | Convert to GeoJSON | Export data for web applications |