Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 21-08-2011, 19:45   #451
Marine Service Provider

Join Date: Feb 2010
Posts: 279
Re: Charts II: NGA - 2700 Charts

I dont know how the web based calibration coding is going but thanks to nohal and net surfer in anticipation Has anyone considered using OCR to fully automate the process. I have captured a corner of a chart and run though a free ocr program and converts the lats and longs ok if i rotate the image I know this is a simplistic idea but maybe worth consideration. I now need a ocr that will convert horizontal and vertical text on one go.

regards

Richard
r.fairman is offline   Reply With Quote
Old 22-08-2011, 02:24   #452
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Davao, Philippines
Posts: 1,776
Send a message via Skype™ to phiggins
Re: Charts II: NGA - 2700 Charts

Can anyone tell me how MapCal or OpenCPN figures out the lat/lon for the upper left corner of a chart

For instance if you take chart 25001 and the calibration data is:

[25001.PNG]
NA=Caribbean Sea-Eastern Part 25001
FN=25001.PNG
GR=0
PY=1
QU=0
SC=1300000
BC=4
B1=9.99810000000001,-72.3333333333333
B2=10.0158500028536,-59.0154999992096
B3=18.7684833333333,-59.0096166666667
B4=18.7555166673491,-72.3254166664701
CC=4
C1=7094,641,18.766666666667,-59.000000000000
C2=170,5327,10.000000000000,-72.333333333333
C3=3459,3212,14.000000000000,-66.000000000000
C4=5535,1058,18.000000000000,-62.000000000000
GD=WGS84
NU=
PR=1
DS=0,0
WI=7360
HE=5699
DX=201.65
DY=201.65

if use the first two calibration points:
X1=7094 Y1=641 LAT1=18.766666666667 LON1=-59.000000000000
X2=170 Y2=5327 LAT2=10.000000000000 LON2=-72.333333333333

Then use this formula for degrees/pixel:
yres = (lat2 - lat1) / (y1 - y2)
xres = (lon2 - lon1) / (x2 - x1)

I get: XRES=0.00192566917003654 YRES=0.001870820884905463

then if I use this formula to figure out the upper left lat (lat3) and the upper left longitude (lon3) with x3 and y3 = 0

lat3 = lat1 + (y1 - y3) * yres
lon3 = lon1 + (x3 - x1) * xres

the answer it gets is:
lat3=19.96586285389140 = 19 57.951 N
lon3=-72.66069709223921 = 72 39.641 W

but Mapcal and OpenCPN says its lat=19.55.385 N lon=72 38.544 W

Both are off quite a bit.

Does anyone know the formula?
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 22-08-2011, 03:59   #453
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Charts II: NGA - 2700 Charts

MY method of converting NGA bitmaps,whatever it's worth, is as follows:

1. Reduce the enormous file sizes to 60-70% of originals using 'BatchImageResizer'
2. Convert the files to 127 col in .png format using GIMP.
3. Calibrating the files using MAPCALII
3. Converting the files to .kap format using GE2KAP

For me,this produces a precise and sharply defined chart of acceptable size of 1-3 MB. Checked against the grid in OCPN it produces an accuracy more than adequate for me.

Tore
Attached Thumbnails
Click image for larger version

Name:	Screenshot_01 Aug. 22 07.56.jpg
Views:	158
Size:	292.9 KB
ID:	30729  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 22-08-2011, 05:04   #454
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Charts II: NGA - 2700 Charts

Here is a typical .png file spec. after preparation in GIMP2.
Anything specifically wrong with it?

Tore
Attached Thumbnails
Click image for larger version

Name:	Screenshot_02 Aug. 22 09.00.jpg
Views:	152
Size:	70.7 KB
ID:	30732  
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 22-08-2011, 07:34   #455
Registered User

Join Date: Jul 2011
Posts: 6
Re: Charts II: NGA - 2700 Charts

I wanted to download the map 52046 for calibration, but I got the image of the map 52045. I think there is a problem of incorrect link or incorrect Jpeg.
To correct and to help you, I have the right dezoomify 52045 and placed on the server project NGA charts.

Regards
Meark56 is offline   Reply With Quote
Old 22-08-2011, 08:45   #456
Registered User

Join Date: Jul 2011
Posts: 33
Re: Charts II: NGA - 2700 Charts

Quote:
Originally Posted by Meark56 View Post
I wanted to download the map 52046 for calibration, but I got the image of the map 52045. I think there is a problem of incorrect link or incorrect Jpeg.
To correct and to help you, I have the right dezoomify 52045 and placed on the server project NGA charts.
Good find.

There appear to be at least 4 other incorrect files on the ftp server:

26247, 57082, 61200, 92220

I say "at least" because I found these by checking duplicate file sizes and it is possible for there to be duplicates with different file sizes, due to the various download and stitch scripts in use.

I am getting the 4 files above from NOOA, but others with faster connections are very welcome to step in and upload them to the ftp server first!

Paul
paulr is offline   Reply With Quote
Old 22-08-2011, 19:53   #457
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
Re: Charts II: NGA - 2700 Charts

Paul:

I'm not at all sure this is correct, but it seems to me the problem you are encountering is because these charts are Mercator projections. So you can't make a linear equivalence between lat/lon and the x/y dimensions. In other words, at the top of the chart, a minute of latitude or longitude occupies a different number of pixels than at the bottom of the chart.

I don't know how Mercator projection works mathematically, but I'm getting ready to Google it :-)

M.
Tia Bu is offline   Reply With Quote
Old 22-08-2011, 20:16   #458
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
Re: Charts II: NGA - 2700 Charts

Google and Wikipedia lead quickly to the formula for converting lat/lon to x/y coordinates in a Mercator projection, but my calculus is too far back in the past to make much sense of it: Mercator projection - Wikipedia, the free encyclopedia

There are a good many charts in the Miscellaneous region that aren't Mercator projections. The Great Circle charts and polar charts are a conical or gnomonic projection, I think. Can OpenCpn or other chart plotting programs even display those?
Tia Bu is offline   Reply With Quote
Old 23-08-2011, 00:33   #459
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Davao, Philippines
Posts: 1,776
Send a message via Skype™ to phiggins
Re: Charts II: NGA - 2700 Charts

Tia Bu,

Yes I realize that the Meractor projection is the problem. I googled it to death and tried a dozen solutions that I found for what is called the Gudermannian formula, but none gave the answer.

Anyway I think I found the code in the OpenCPN source so I'm going to steal/borrow it and try it.

To me it looks like the OpenCPN code handles many different projections.

Thanks for your help.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 23-08-2011, 06:30   #460
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
Re: Charts II: NGA - 2700 Charts

Quote:
Originally Posted by sinbad7 View Post
MY method of converting NGA bitmaps,whatever it's worth, is as follows:

1. Reduce the enormous file sizes to 60-70% of originals using 'BatchImageResizer'
2. Convert the files to 127 col in .png format using GIMP.
3. Calibrating the files using MAPCALII
3. Converting the files to .kap format using GE2KAP

For me,this produces a precise and sharply defined chart of acceptable size of 1-3 MB. Checked against the grid in OCPN it produces an accuracy more than adequate for me.

Tore

That looks great. Have you done any charts with insets yet? If so, how did you handle those?

M.
Tia Bu is offline   Reply With Quote
Old 23-08-2011, 09:55   #461
Registered User
 
phiggins's Avatar

Join Date: Nov 2004
Location: Davao, Philippines
Posts: 1,776
Send a message via Skype™ to phiggins
Re: Charts II: NGA - 2700 Charts

I don't know if sinbad7 has done any insets but I have: chart 24402 has two insets that I just removed by putting in more border points to go around them with MapCal. Its a bit tricky but first put the 4 around the outside starting in Lower left corner then save the calibration then move the 2nd point back and then start inserting new border points.

And you can do both of his steps 1,2 with Nconvert, much easier than firing up Gimp.

Also, I just uploaded GE2KAP.V6.0.10 which handles images up tp 5Gig. Of course you have to have the virtual memory to support that size. It also fixes a few things Tore found.
__________________
Paul,
" One moment you are running along, the next you are no more." Dean Spanley
phiggins is offline   Reply With Quote
Old 23-08-2011, 12:41   #462
Registered User

Join Date: Jul 2011
Posts: 33
Re: Charts II: NGA - 2700 Charts

Quote:
Originally Posted by paulr View Post

There appear to be at least 4 other incorrect files on the ftp server:

26247, 57082, 61200, 92220
I have now uploaded the correct versions of these files to the FTP server.
Along with Meark56's correct version of 52046, they are all in the incoming folder, along with July and August files.

I think I am correct in saying that they only become available for download once they have been relocated on the server.

Paul
paulr is offline   Reply With Quote
Old 23-08-2011, 12:44   #463
Registered User
 
sinbad7's Avatar

Join Date: Sep 2003
Location: Ubatuba,SP,Brazil (Ex Norway)
Boat: (Ex) Alu. 60' yacht-"Eight Bells"
Posts: 2,731
Images: 57
Send a message via Skype™ to sinbad7
Re: Charts II: NGA - 2700 Charts

If you are not going to use the insets for navigation,why not just ignore them?
They can be handy for a visual inspection of the harbour in more detail.
The charts paper corner points remain the same.

For some reason,none of my progs. including NConvert would open many of these huge NGA charts,which is why I used BatchImageResizer which can batch reduce large files without opening/displaying them first.

Tore
__________________
"And all I ask is a tall ship and a star to steer her by."
sinbad7 is offline   Reply With Quote
Old 24-08-2011, 07:15   #464
Registered User

Join Date: Jan 2007
Location: Minneapolis
Boat: Irwin 37 CC
Posts: 665
Re: Charts II: NGA - 2700 Charts

Quote:
Originally Posted by sinbad7 View Post
If you are not going to use the insets for navigation,why not just ignore them?
They can be handy for a visual inspection of the harbour in more detail.
The charts paper corner points remain the same.

For some reason,none of my progs. including NConvert would open many of these huge NGA charts,which is why I used BatchImageResizer which can batch reduce large files without opening/displaying them first.

Tore
Tore,
Which BatchImageResizer are you using. The one that I downloaded from CNET doesn't seem to have a % reduction.
__________________
David Kester
Pegasus IV
wdkester is offline   Reply With Quote
Old 24-08-2011, 07:20   #465
Registered User
 
Tia Bu's Avatar

Join Date: Jul 2009
Location: South Carolina
Boat: 40' Jeanneau
Posts: 492
Re: Charts II: NGA - 2700 Charts

Quote:
Originally Posted by sinbad7 View Post
If you are not going to use the insets for navigation,why not just ignore them?
They can be handy for a visual inspection of the harbour in more detail.
The charts paper corner points remain the same.

For some reason,none of my progs. including NConvert would open many of these huge NGA charts,which is why I used BatchImageResizer which can batch reduce large files without opening/displaying them first.

Tore
Yes, I wound up just ignoring them as I made some charts. But some of the charts are really nothing but a collection of insets, many of which would be very useful for navigation. On a cruise up the U.S. East Coast and back this summer, I wound up using the NOAA insets a great deal in OpenCPN. At least with the NOAA charts, where there's an inset, you generally need it.

The best way to deal with insets I've found so far is to cut them out of the image using GIMP and make them a separate chart. But surely there's a better way?
Tia Bu is offline   Reply With Quote
Reply

Tags
charts


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 05:56.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.