Giter VIP home page Giter VIP logo

geouk's Introduction

Header image

Ieuan Walker | Twitter           Ieuan Walker | Linkedin           Ieuan Walker | Instagram           Ieuan Walker | Stack overflow


I am a full stack senior software engineer working on websites, backend and mobile. My main passion is learning new things, and if i build something cool or usefull i try to turn it into a OSS project. Some of the technologies I enjoy working with include .NET Core, razor pages, web API's (REST), .NET MAUI, and Xamarin.Forms.

Top Langs

GitHub Stats GitHub Streak

Check out my repos

geouk's People

Contributors

codacy-badger avatar dependabot-preview[bot] avatar ieuanwalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

geouk's Issues

Download lookup table as binary

Downloading multiple massive lookup tables in executable takes many minutes to startup in MAUI.
In binary no delay and executable is smaller.

[Request] 10-digit Osgb36 from WGS84 LatLon

I'm currently working on a project that requires converting WGS84 LatLon coordinates to Osgb36 coordinates.

While the library does facilitate this, it's unfortunately only possible to create 6-digit Osgb36 values:
e.g. (note: the below aren't real values)
LatLon: 50.5253453, 1.535435353
becomes
Osgb36: NR395295

Ideally I need this to be 10-digits (NR3954129562) so the ability to specify the conversion accuracy as a function parameter would be fantastic.

As an aside to this, assuming these changes can't be made would I be correct in thinking that accuracy is lost during the rounding stage on the last line of the code clipped below? (GeoUK/GeoUK/Coordinates/Osgb36.cs)

public string MapReference
        {
            get
            {
                /*
				10km (2-figure) Grid Reference: SO84 = 380000 Easting 240000 Northing
				1km (4-figure) Grid Reference: NS2468 = 224000 Easting 668000 Northing
				100m (6-figure) Grid Reference: TL123456 = 512300 Easting 245600 Northing
				*/
                double easting = Easting;
                double northing = Northing;

                string bngSquare = GetBngSquare(easting, northing);

                //get the number of complete 500k squares
                int indexNorthing = (int)Math.Floor(northing / 500000);
                int indexEasting = (int)Math.Floor(easting / 500000);

                //reduce E and N by the number of 500k squares
                northing -= indexNorthing * 500000;
                easting -= indexEasting * 500000;

                //reduce by the number of 100k squares within the 500k square.
                indexNorthing = (int)Math.Floor(northing) / 100000;
                indexEasting = (int)Math.Floor(easting) / 100000;

                northing -= indexNorthing * 100000;
                easting -= indexEasting * 100000;

                northing = Math.Round(northing / 100);
                easting = Math.Round(easting / 100);
                return $"{bngSquare}{Math.Round(easting):000}{Math.Round(northing):000}";
            }
        }

Thanks,
Sam

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.