Giter VIP home page Giter VIP logo

Comments (5)

Gonzalo-Mier avatar Gonzalo-Mier commented on September 27, 2024

Hi @groengpx, welcome to the project!!
Yes, Fields2Cover works on local coordinates. Fortunately, the library provides the class Transform to transform the coordinate system safely.

As an example:

F2CField field = ...; // Import your field
field.setEPSGCoordSystem(4326);  // WGS84 is EPSG:4326
f2c::Transform::transform(field, "EPSG:28992");  // Transform the field to a coordinate system that works in meters (28992 is from NL)
// ... Compute the path ...
 auto returned_path2 = f2c::Transform::transformPathWithFieldRef(path2, field, "EPSG:4326"); // Return the path to WGS84

Remember that this is an example to show the conversion between WGS84 to any EPSG coordinate system. If you were really working on NL, coordinate values should be recorded and saved on ETRS89 (EPSG:4258).

from fields2cover.

groengpx avatar groengpx commented on September 27, 2024

Ah, thanks.

But then I need to know the local system of each country. Do you think I can get away with UTM zones? For example, when starting with a transformation, I check in which UTM zone the first coordinate is (let's say N31 (epsg:32631)) and then use that zone for the transformations (instead of epsg:28992 in your example).

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on September 27, 2024

This should work f2c::Transform::transform(field, "UTM:31N datum:WGS84"), but I haven't tested in depth

from fields2cover.

Gonzalo-Mier avatar Gonzalo-Mier commented on September 27, 2024

@groengpx Did it solved your problem? :)

from fields2cover.

groengpx avatar groengpx commented on September 27, 2024

Haven't got time yet, but it seems to be a good solution. I will close this for now. If it won't work, I will reopen.

from fields2cover.

Related Issues (20)

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.