Showing posts with label Flutter. Show all posts
Showing posts with label Flutter. Show all posts

Wednesday, March 19, 2025

Take Geospatial files on the go with the Shapefiler App

 Easily load and visualize multiple GeoJSON and Shapefiles with this powerful mapping tool. The app automatically assigns overlay colors, but you have full control over the styling—customize icons, colors, and opacity through the layer properties menu. Tap on polygons, lines, and markers to view detailed feature attributes. Quickly find specific locations with the built-in free text search, making navigation effortless. Whether you're a GIS professional or a mapping enthusiast, this app provides an intuitive way to explore spatial data on your device. 


Key features

Load multiple Geospatial files: Overlay GeoJSON and Shapefiles over a choice of base map tiles.

Integrated tabular and map views: Tap on a data table record to locate the corresponding feature on the map

Multiple coordinate reference systems: Source Geospatial GeoJSON and Shapefiles in various coordinate reference systems can be reprojected to the standard World Mercator projection for display.

Free text search: Easily search features by text and locate on the map. 

For more detailed information, visit https://dominoc925.blogspot.com/p/shapefiler-help.html

Download and try out the Shapefiler app from the following stores:

Get it on Google Play

Monday, September 30, 2024

Batch Convert Coordinates using the Koordinat2 app

 

A batch coordinates conversion tool has been added to the Koordinat2 web app (https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html) to perform bulk coordinates transformation between coordinate systems. 

This post shows how to use the Batch Coordinates Converter.

Launch the Batch Coordinates Converter

  1. Use a browser to open the Koordinat2 web app url (https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html).




  2. Tap the hamburger icon on the top left.

    The Navigation drawer appears.



  3. Tap the Batch Coordinates Converter list item.

    The Batch Coordinates Converter screen appears.


Define the Primary Coordinate System

  1. In the Primary Coordinates card, click the gear icon.

    The Primary coordinates selection appears.

  2. Select a coordinate system from the list or search for it by clicking the Search icon and typing in the name of the coordinate system e.g. MGRS.

    MGRS is selected as the primary coordinate system.

Define the Secondary Coordinate System

  1. In the Secondary Coordinates card, click the gear icon.

    The Secondary Coordinates screen appears.


  2. Select a coordinate system from the list or search for it by clicking the Search icon and typing in the name of the coordinate system e.g. WGS 84.

    WGS 84 geographic is selected as the secondary coordinate system.

Enter the coordinates and perform the conversion

  1. In the Primary Coordinates text field, type or paste in the coordinates to convert.



  2. Click the right arrow to convert from primary to secondary coordinate system.

    The coordinates are converted.

Monday, September 23, 2024

Convert East North Up (ENU) to/from longitude,latitude and other various coordinate systems

 

The Koordinat2 web app (https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html) has been upgraded to perform coordinate transformation between local coordinate system East North Up (ENU) and many other coordinate systems including MGRS, North East Down, ECEF, geographic longitude/latitude, etc. 

This post shows the typical steps to perform the local ENU conversion to other coordinate systems.

Define the ENU local origin 

The local origin should be as near as possible to the area of interest. If it is too far away, the calculation rounding errors would result in erroneous converted coordinates.

  1. Use a browser to open the Koordinat2 web app url (https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html).

    The Koordinat2 web app home page appears.


  2. Click the hamburger menu icon on the top left.

    The Navigation drawer opens.



  3. Click the Settings item.

    The Settings dialog appears.




  4. Choose the item North East Down/East North Up reference origin.

    The NED/ENU Reference Origin appears.



  5. In the dialog, enter the reference origin Longitude, Latitude, and Altitude. Click Save.

    The Reference Origin is saved.

Define ENU as the Primary coordinates (input)

  1. In the Primary coordinates card, click the gear icon.

    The Primary coordinates selection appears.




  2. Select East North Up from the list or search for it by clicking the Search icon and typing in ENU.



Define the Secondary coordinates (output)

  1. In the Secondary coordinates card, click the gear icon.

    The Secondary coordinates selection appears.



  2. Select a desired coordinate system e.g. MGRS from the list or search for it by clicking the Search icon and typing in  MGRS.



Enter ENU coordinates

  1. In the Primary coordinates card, type in the East, North and Up values.

    The ENU values are converted to the secondary coordinates. And a marker appears on the map.






Tuesday, August 13, 2024

Trainsity Metro App


 

Navigate public train networks effortlessly with the Trainsity Metro app's high-resolution vector maps. Choose and download the maps you need, enjoying detailed zoom levels without sacrificing storage space. Access all features offline, without needing an internet connection.

Key Features:

High-Resolution Vector Maps: Crisp, clear maps with multiple zoom levels for detailed viewing.
 

Offline Functionality: Download maps and use them anytime, anywhere, without an internet connection.
 

Interactive Stations: Tap on a train station to open Google Maps, view the surrounding area, and get precise routing directions.


Optimized Travel Planning: Use the offline function to calculate the best routes between stations, complete with step-by-step directions and estimated timings. 

Train timetable: View static train line schedules, frequencies, and the first/last departures at individual stations. 

Note: Actual travel times may vary.

Discover a seamless way to explore train networks with our intuitive and efficient app. 

Available maps:

  1. Singapore
  2. Kuala Lumpur, Malaysia
  3. Sapporo, Japan
  4. Recife, Brazil
  5. Brasilia, Brazil
  6. Vancouver, Canada
  7. Hong Kong, China
  8. Bangkok, Thailand
  9. Manila, Philippines
  10. Osaka, Japan
  11. Amsterdam, Netherlands
  12. Hanoi, Vietnam  
  13. Utrecht, Netherlands
  14. Jakarta, Indonesia 
  15. Rio de Janeiro, Brazil
  16. Palembang, Indonesia
  17. Edmonton, Canada
  18. Calgary, Canada
  19. Sydney, Australia
  20. Fukuoka, Japan
  21. Paris, France
  22. Fortaleza, Brazil
  23. Montreal, Canada
  24. Rome, Italy
  25. Toronto, Canada
  26. Lyon, France
  27. Algiers, Algeria  
  28. São Paulo, Brazil
  29. Perth, Australia
  30. Ho Chi Minh City, Vietnam
  31. Milan, Italy
  32. Nuremberg, Germany 
  33. Copenhagen, Denmark
  34. Sobral, Brazil
  35. Natal, Brazil  
  36. Doha, Qatar
  37. Kaohsiung, Taiwan
  38. Daegu, South Korea 
  39. Busan, South Korea 
  40. Cariri, Brazil 
  41. Taipei, Taiwan 

 Download and try out the Trainsity Metro app from the following stores:

 

Get it on Google Play 

Monday, March 25, 2024

Convert Earth Centered Earth Fixed to/from other coordinate systems with this web app Koordinat2

According to Wikipedia https://en.wikipedia.org/wiki/Earth-centered%2C_Earth-fixed_coordinate_system: in today's modern age of navigation and spatial referencing, there's a key player that often goes unnoticed: the Earth-centered, Earth-fixed coordinate system, more commonly known as ECEF. This sophisticated system, akin to a cosmic GPS, allows us to pinpoint locations with incredible precision. Picture this: a cartesian grid that not only encompasses the Earth's surface but also delves deep into its core, reaches high into the atmosphere, and extends into the surrounding outer space. Through X, Y, and Z measurements from the Earth's center of mass, ECEF opens up a world of possibilities for mapping and exploration.

The WebApp Koordinat2 here on https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html has been enhanced to include conversions between ECEF and various other geo-coordinate systems.  

The following shows how to use convert ECEF to/fro longitude, latitude, altitude WGS84.

Define ECEF as the Primary coordinates (input)

  1. Open a browser to the Koordinat2 web app url https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html.

    The Koordinat2 web app home page is displayed.


  2. In the Primary coordinates input card, click the gear icon.

    The Primary coordinates selection dialog box appears with a list of favorite coordinate systems.



  3. Click the ECEF item from the favorite list, or search for it by clicking the Search icon and typing in ECEF.





Define WGS 84 as the Secondary coordinates (output)

  1. In the Secondary coordinates card, click the gear icon.

    The Secondary coordinates favorites list is displayed.


  2. Click on the WGS 84 item from the favorites list, or click the Search icon and typing in WGS 84 to search for it.



Enter ECEF coordinates

  1. In the Primary coordinates card, type in the X, Y, and Z ECEF values.

    The ECEF values are converted to the secondary WGS 84 coordinates. A marker appears on the map.



Monday, March 18, 2024

Convert North East Down (NED) to/from longitude,latitude and other various coordinate systems

The Koordinat2 web app (https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html) has been upgraded to perform coordinate transformation between local coordinate system North East Down (NED) and many other coordinate systems including MGRS, geographic longitude/latitude, etc. 

This post shows the typical steps to perform the local NED conversion to other coordinate systems.

Define the NED local origin 

The local origin should be as near as possible to the area of interest. If it is too far away, the calculation rounding errors would result in erroneous converted coordinates.

  1. Use a browser to open the Koordinat2 web app url (https://dominoc925-pages.appspot.com/webapp/koordinat2/default.html).

    The Koordinat2 web app home page appears.


  2. Click the hamburger menu icon on the top left.

    The Navigation drawer opens.



  3. Click the Settings item.

    The Settings dialog appears.


  4. Choose the item North East Down reference origin.

    The NED Reference Origin appears.


  5. In the dialog, enter the reference origin Longitude, Latitude, and Altitude. Click Save.

    The Reference Origin is saved.

Define NED as the Primary coordinates (input)

  1. In the Primary coordinates card, click the gear icon.

    The Primary coordinates selection appears.




  2. Select North East Down from the list or search for it by clicking the Search icon and typing in NED.


Define the Secondary coordinates (output)

  1. In the Secondary coordinates card, click the gear icon.

    The Secondary coordinates selection appears.



  2. Select a desired coordinate system e.g. WGS 84 from the list or search for it by clicking the Search icon and typing in  WGS 84.


Enter NED coordinates

  1. In the Primary coordinates card, type in the North, East, and Down values.

    The NED values are converted to the secondary coordinates. And a marker appears on the map.




Monday, February 12, 2024

Deserialize a list of JSON objects using json_annotation and json_serializable in Flutter

I could not find an example of how to read in a list of JSON objects from a file using the Flutter packages: json_annotation and json_serializable. After a while I figured the way to do it. This post shows an example of automating JSON de-serialization of a JSON file that looks like the following:

[
    {
        "code": "NED",
        "fullname": "North East Down (local)",
    },
    {
        "code": "ECEF",
        "fullname": "Earth Centered Earth Fixed (ECEF)",
    },    
    {
        "code": "LLA",
        "fullname": "WGS 84",
    }
]

Install the Flutter packages Json_serializable and Json_annotation

In a Terminal, type in the following:

$ cd /path/to/the/root/of/flutter/project/

$ flutter pub add json_annotation

$ flutter pub add json_serializable

Code the model class dart file

  1. In a text editor, create the model class dart file, e.g. cs_model.dart.

  2. Type in the following:

import 'package:json_annotation/json_annotation.dart';

// Part file to be auto generated
part 'cs_model.g.dart';

@JsonSerializable()
class APICoordSysQuery {

  // Factory method to load in the list of JSON objects
  factory APICoordSysQuery.fromJson(List<dynamic> parsedJson){
    List<APICoordSys> csList = List<APICoordSys>.empty();
    csList = parsedJson.map ( (e) => APICoordSys.fromJson(e)).toList();
    return APICoordSysQuery(
      csList: csList,
    );
  }
  
  // To be auto generated by the Json_serializable package
  Map<String, dynamic> toJson() => _$APICoordSysQueryToJson(this);

  @JsonKey(name: 'csList')
  List<APICoordSys> csList;

  APICoordSysQuery({
    required this.csList
  });
}

@JsonSerializable()
class APICoordSys {
  
  // Factory method to deserialize a JSON object to be auto generated
  factory APICoordSys.fromJson(Map<String, dynamic> json) =>
    _$APICoordSysFromJson(json);
  
  // Factory method to serialize a JSON Object to be auto generated
  Map<String, dynamic> toJson() => _$APICoordSysToJson(this);

  @JsonKey(name: 'code')
  String code;
  @JsonKey(name: 'fullname')
  String fullName;

  // Constructor
  APICoordSys({
    required this.code,
    required this.fullName
  });
}

Generate the .part file

  1. In a Terminal, run the following:

    $ cd /path/to/flutter/root/project/
    $ dart run build_runner build


    Processing messages appear and the cs_model.part.g.dart file is generated.

Now you should be able to load in a list of JSON objects in Flutter.

 

Monday, June 27, 2022

WebApp for Singapore Weather forecasts rewritten using Flutter

I thought the old Singapore Weather Nowcast WebApp at this site https://dominoc925-pages.appspot.com/webapp/weather_sg/default.html written using the AngularJS framework and Bootstrap was a good candidate for a Flutter app. So I rolled up the sleeves and rewrote it using Flutter. Now it has Material design and this is how it looks and works.

4 day outlooks

For the Flutter version, I included additional data from the National Environment Agency (NEA)'s 4 day outlooks with temperature, wind and humidity values.


2 hour nowcasts

The 2 hour weather nowcast is now displayed in a responsive 2 pane display.


On small screens, a tab bar will appear displaying the nowcast list and map on separate tabs. 

 

24 hour forecasts

The new 24 hour forecasts are separated by 3 tabs as shown in the screenshot below. Clicking each tab will show the forecast for that time period. And like the 2 hour nowcast display, the 24 hour forecasts display is also responsive to screen sizes.

To try out the new Flutter WebApp, visit this web site: https://dominoc925-pages.appspot.com/webapp/weather_sg/default.html.


Monday, May 2, 2022

Time Converter App for time conversion in the browser developed with Flutter

I recently learned Flutter (https://flutter.dev/) - a cross platform SDK for building native Android, IOS, Windows, Linux, Web, and MacOS applications with a single code base. For practice, I built a simple application - a Time Converter App for converting time values from various formats to other formats. The formats include GPS time, Julian date, Unix epoch, and UTC date time.

Using the Time Converter App

  1. To use the application, open up a browser and go to https://dominoc925-pages.appspot.com/webapp/timeconverterapp/.

    The app page is loaded.


  2. In the Convert from drop down field, select the source time format e.g. gps.


     

  3. In the to format drop down field, select the destination time format e.g.  utc.

  4. In the entry fields, click the clock icon to use the current system time values. Or type in the values e.g. 2207 as shown below.




  5. Click the blue Convert button.

    If the input values are valid, then the converted time value will be shown in the Output field.