Giter VIP home page Giter VIP logo

Comments (12)

wo80 avatar wo80 commented on September 24, 2024 2

@FObermaier I'll do a pull request.

from projnet4geoapi.

airbreather avatar airbreather commented on September 24, 2024

PROJ4 extension is not supported by ProjNet4GeoAPI at this time, I think.

from projnet4geoapi.

ondrasvoboda avatar ondrasvoboda commented on September 24, 2024

I'm hitting the same issue, in my case I need to transform GK4 to WGS84 using BETA2007.gsb gridfile. Is there any plan to implement this?
Thanks!

from projnet4geoapi.

wo80 avatar wo80 commented on September 24, 2024

I needed the same transformation from GK to ETRS89/UTM, so here's some code to test: https://github.com/wo80/NTv2

Take a look at CoordinateTransformTest.cs to see how a grid file can be used.

from projnet4geoapi.

ondrasvoboda avatar ondrasvoboda commented on September 24, 2024

Works great, thanks!
Would be nice to have it integrated into NetTopologySuite.

from projnet4geoapi.

FObermaier avatar FObermaier commented on September 24, 2024

@wo80, well done, do you mind us merging your project into this project?

from projnet4geoapi.

wo80 avatar wo80 commented on September 24, 2024

@FObermaier not at all.

For a more feature complete version the CoordinateTransformationFactory extension methods have to be reviewed/extended, since they were just written to work with the German coordinate systems. Other CS combinations might not work as expected (I tested NAD27 <> NAD83 and there was a clear difference to what some online converters show, see TestNAD).

from projnet4geoapi.

FObermaier avatar FObermaier commented on September 24, 2024

@wo80, I noticed that you are still working on it. Give us a hint when you think it is in a state for merging.
Or would you like to do it yourself?

from projnet4geoapi.

ondrasvoboda avatar ondrasvoboda commented on September 24, 2024

@wo80, just noticed that WGS84->GK4 fails with "No support for transforming between the two specified coordinate systems", can also this transformation be supported? Isn't it just a matter of extending the IF inside CreateFromCoordinateSystems method?

from projnet4geoapi.

ondrasvoboda avatar ondrasvoboda commented on September 24, 2024

Seems that adding this part in there, does the trick:

else if (sourceCS is GeographicCoordinateSystem && targetCS is ProjectedCoordinateSystem)
{
	ct = factory.CreateFromCoordinateSystems(sourceCS, targetCS);

	var list = GetCoordinateTransformationList(ct);

	// list[0] = source geographic -> geocentric
	// list[1] =        geocentric -> target projected

	// Replace the geographic transform with our grid transformation.
	list[0] = CreateCoordinateTransformation((ICoordinateTransformation)list[0], grid, inverse);
}
else if (sourceCS is ProjectedCoordinateSystem && targetCS is GeographicCoordinateSystem)
{
	ct = factory.CreateFromCoordinateSystems(sourceCS, targetCS);

	var list = GetCoordinateTransformationList(ct);

	// list[0] = source projected -> geocentric
	// list[1] =        geocentric -> target geographic

	// Replace the geographic transform with our grid transformation.
	list[1] = CreateCoordinateTransformation((ICoordinateTransformation)list[1], grid, inverse);
}

from projnet4geoapi.

wo80 avatar wo80 commented on September 24, 2024

@ondrasvoboda thanks, I'll add it to the pull request.

from projnet4geoapi.

ondrasvoboda avatar ondrasvoboda commented on September 24, 2024

cool, thanks

from projnet4geoapi.

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.