Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6209901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:04:02+00:00 2026-05-24T06:04:02+00:00

I need to write a function that can project some location defined by latitude/longitue

  • 0

I need to write a function that can project some location defined by latitude/longitue to x,y coordinates on a map (image).

The map itself seems to be using “belgian Lambert” as projection type.

I found some official information about this projection and its configuration : http://ign.be/FR/FR2-1-4.shtm and http://ign.be/Common/Lambert2008/Transformation_Geographic_Lambert_FR.pdf (in french, I’ll translate if needed).

Basically, I came to the conclusion that it would be easier to use some library (although that’s not a requirement here). After some research, it seems that OpenMap should be able to do the work.

So, here is what I got so far:

private Point mapCoordinatesToPoint(LatLonPoint latLonPoint) {
    LatLonPoint centerLatLonPoint = new LatLonPoint(50.797815, 4.3592158333333333333333333333333);
    Proj proj = new LambertConformal(centerLatLonPoint, 1, 1000, 1000, 4.3592158333333333333333333333333, 49.833333333333333333333333333333, 51.166666666666666666666666666667, 50.797815, 649328.0, 665262.0, Ellipsoid.GRS_1980);
    return proj.forward(latLonPoint);
}

(knowing that my gif is 1000×1000)

JavaDoc for LamberConformal constructor: http://openmap.bbn.com/doc/api/com/bbn/openmap/proj/LambertConformal.html#LambertConformal%28com.bbn.openmap.LatLonPoint,%20float,%20int,%20int,%20double,%20double,%20double,%20double,%20double,%20double,%20com.bbn.openmap.proj.Ellipsoid%29

I guess I didn’t configure it right: some point that should be on the map, xxx, gives this result:

x=-1766051.0; y=-1.6355546E7;

Giving the “center point” (?) as parameter gives

x=500.0; y=500.0;

(middle of the map, which looks ok)

Anyone familiar with this, or able to figure the configuration from the links?

EDIT:

tried replacing last line from method with this:

    return proj.forward(latLonPoint.getLatitude(), latLonPoint.getLongitude(), new Point(), false);

but not better.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:04:03+00:00Added an answer on May 24, 2026 at 6:04 am

    For those interested, here is how I did let it work.

    This is for a map of Belgium (seems to be using either Lambert 72 or 2008).

        Proj proj = new LambertConformal(centerLatLonPoint, scale, 1776, 1468,
                4.3592158333333333333333333333333, //centralMeridian
                49.833333333333333333333333333333, //lambert_sp_one
                51.166666666666666666666666666667, //lambert_sp_two
                50.797815, //referenceLatitude
                649328.0, //falseEasting
                665262.0, //falseNorthing
                Ellipsoid.GRS_1980);
    

    Scale can be calculating this way:

        LatLonPoint dePanneLatLonPoint = new LatLonPoint(51.0975f, 2.5855f);
        Point dePannePoint = new Point(27, 313);
    
        LatLonPoint mussonLatLonPoint = new LatLonPoint(49.5567f, 5.7106f);
        Point mussonPoint = new Point(1464, 1426);
    
        float scale = proj.getScale(dePanneLatLonPoint, mussonLatLonPoint, dePannePoint, mussonPoint);
    

    The two points being arbitrary points (as nw and se as possible) for which you know both the geographical coordinates and where this is projected on the map.

    I also had to find the geographical coordinates of the center of the map.

    The location of a point on the map can then be found this way:

         Point point = proj.forward(latitude, longitude, new Point(), false);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to write a function that takes some HTML, strips out the img
I need to write a function that takes 4 bytes as input, performs a
I need to be able to write a function that shows repeated words from
I need to write code that picks up PGP-encrypted files from an FTP location
Lets say I need to write several functions processing some data. These functions are
I need write an update statement that used multiple tables to determine which rows
I need to write a Java Comparator class that compares Strings, however with one
I need to write a Delphi application that pulls entries up from various tables
I'm trying to create a set of function templates that can take different types
Please suggest me a good method that can be used to write a stream

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.