Coder Social home page Coder Social logo

navibyte / geospatial_demos Goto Github PK

View Code? Open in Web Editor NEW
5.0 0.0 0.0 3.67 MB

Geospatial demo and sample apps for Dart and Flutter.

License: Other

Kotlin 0.16% Ruby 3.37% Swift 1.59% Objective-C 0.05% Dart 41.45% CMake 22.79% C++ 26.28% C 1.79% HTML 2.52%
dart flutter geojson geospatial google-maps riverpod ogc-api

geospatial_demos's People

Contributors

navispatial avatar

Stargazers

 avatar  avatar  avatar  avatar

geospatial_demos's Issues

Utilize DMS (degree-minutes-seconds) formatting by geobase 0.5.1

geobase 0.5.1 has support for spherical geodesy functions and also DMS formatting utilities.

See sample from geobase:

Format geographic coordinates as string representations (DD, DM, DMS):

```dart
  const p = Geographic(lat: 51.4778, lon: -0.0014);

  // all three samples print decimal degrees: 51.4778°N 0.0014°W
  print(p.latLonDms(separator: ' '));
  print('${p.latDms()} ${p.lonDms()}');
  print('${Dms().lat(51.4778)} ${Dms().lon(-0.0014)}');

  // prints degrees and minutes: 51°28.668′N, 0°00.084′W
  const dm = Dms(type: DmsType.degMin, decimals: 3);
  print(p.latLonDms(format: dm));

  // prints degrees, minutes and seconds: 51° 28′ 40″ N, 0° 00′ 05″ W
  const dms = Dms.narrowSpace(type: DmsType.degMinSec);
  print(p.latLonDms(format: dms));

  // 51 degrees 28 minutes 40 seconds to N, 0 degrees 0 minutes 5 seconds to W
  const dmsTextual = Dms(
    type: DmsType.degMinSec,
    separator: ' ',
    decimals: 0,
    zeroPadMinSec: false,
    degree: ' degrees',
    prime: ' minutes',
    doublePrime: ' seconds to',
  );
  print(p.latLonDms(format: dmsTextual));

Parsing and formatting is supported also for geographic bounding boxes:

  // Parses box from decimal degrees (DD) with cardinal direction symbols.
  final box =
      GeoBox.parseDms(west: '20°W', south: '50°N', east: '20°E', north: '60°N');

  // prints degrees and minutes: 20°0′W 50°0′N, 20°0′E 60°0′N
  const dm0 = Dms(type: DmsType.degMin, decimals: 0, zeroPadMinSec: false);
  print('${box.westDms(dm0)} ${box.southDms(dm0)}'
      ' ${box.eastDms(dm0)} ${box.northDms(dm0)}');

In the previous example dm, dm0, dms and dmsTextual are instances of the
Dms class that implements DmsFormat. This defines multiple methods for
parsing and formatting decimal degrees and sexagesimal degrees
(degrees/minutes/seconds) on latitude, longitude and bearing values.

The default format used by Geographic and GeoBox classes formats values as
decimal degrees with cardinal direction symbols. To use other formats
(degrees/minutes or degrees/minutes/seconds), or to set other parameters (like
separators, symbol characters, the number of decimals, zero padding or value
signing) you should create a custom Dms instance.


Utilizing these utilities when representing geographic coordinates in UI.

Demo feature layer to BGS OGCAPI Features in Earthquake Map

Earthquake Map sample app has a GeoJSON client / feature layer on the GeoJSON service provided by USGS.

BGS (British Geological Survey) also has an earthquake service - that is conforming to OGC API Features standard. It would be nice to use it on a demo along with "plain" GeoJSON data source from USGS.

Docs:
https://www.api.gov.uk/bgs/bgs-ogcapi-server/#bgs-ogcapi-server

API endpoint:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.