AI Assistant
Notifications
Clear all

Bezitopo now includes working convertgeoid program

14 Posts
7 Users
0 Reactions
788 Views
NCSpiralGuy
(@ncspiralguy)
Posts: 62
Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

I just released Bezitopo 0.1.1. Eventually it will be a CAD program designed specifically for surveying, but right now the major new feature is the convertgeoid program. This reads geoid files published by the NGS and the NGA, optionally makes an excerpt containing any number of (latitude, longitude, radius) small circles, and writes them in any of several formats, including GSF.

There is a possible bug in the GSF format. The files I had to work with, which were excerpted by Carlson, have the same number of rows as columns. I cannot therefore be sure, though I read the spec, that the files convertgeoid produces, which, given one circle, have more columns than rows unless they're centered at the equator, are correct.

I would like help in the following areas:

  • Compiling for Windows and Mac. I have cross-compiled an executable which runs on Windows, but I'm going to link with Qt to start writing the GUI, which will make cross-compiling more complicated.
  • Testing it on a big-endian machine.
  • Writing routines to read and write other geoid file formats. If you live outside the USA and your country publishes geoid files in a different format, or your data collector uses a format other than GSF, such as GEO, you can help by writing code to read and write those formats.
  • Localization. Wait until I make the project link with Qt before you translate anything, since its .ts file format is different from the .po format you're probably used to.

Future directions:

  • I'm going to write a GUI program, tentatively named pangeoid, which will allow you to view multiple geoids at once and pan around them together, as well as all that convertgeoid does.
  • After that, I'll add a GUI to bezitopo itself.
  • I'm also planning to write algorithms that will let you do more things with spirals than you ever imagined.

Download it at http://bezitopo.org/bezitopo-0.1.1.html .


 
Posted : July 21, 2017 5:56 pm
peter-ehlert
(@peter-ehlert)
Posts: 2958
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

I will test on Debain Stretch. Thanks

PS: what is "a big-endian machine". I have a dual xeon HP Z620 if that helps.


 
Posted : July 21, 2017 6:30 pm
paden-cash
(@paden-cash)
Posts: 11086
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Peter Ehlert, post: 438075, member: 60 wrote: ..what is "a big-endian machine"?..

There must be a difference in the vernacular...but around here a 'big-endian machine' usually refers to the honored 80 c.I. flathead Indian Chief.


 
Posted : July 21, 2017 10:27 pm
jhframe
(@jim-frame)
Posts: 7465
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Peter Ehlert, post: 438075, member: 60 wrote: what is "a big-endian machine".

Motorola 68000, early Sun Sparcs, some IBM, a few others. Intel processors are little-endian.

See the https://en.wikipedia.org/wiki/Endianness&apos ;">Wikipedia article on endianness.


 
Posted : July 22, 2017 8:06 am
peter-ehlert
(@peter-ehlert)
Posts: 2958
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Thanks Jim.
I was understanding that not all Intel processors are "little-endian" but that evaluation is beyond my gray matter processing unit.
I hope https://surveyorconnect.com/community/members/ncspiralguy.12287/&apos ;">NCSpiralGuy will further define his desires.


 
Posted : July 22, 2017 8:55 am

NCSpiralGuy
(@ncspiralguy)
Posts: 62
Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

All processors that run the x86 or x86-64 instruction set are little-endian, including the Xeon. The NGS seems to think that all Unix boxes are big-endian and all PCs run DOS or Windows. Both have been false for at least two decades. I saw a mention of SUN on the NGS site, so maybe the only Unix they know about is Solaris running on Sparc.

If you write a geoid in NGS binary format, it defaults to native-endian (whatever your processor uses). Here is the start of test.bin (produced by bezitest):

00 00 80 06 00 00 00 c0 00 00 80 06 00 00 00 c0

In big-endian, it would be

c0 00 00 00 06 80 00 00 c0 00 00 00 06 80 00 00

I haven't tested it on a big-endian machine, so it needs to be tested to make sure that the endian routines work right on a big-endian machine.


 
Posted : July 22, 2017 7:49 pm
richard-imrie
(@richard-imrie)
Posts: 2207
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

I encountered and had trouble with the endians on one occasion - importing 12DA file format to Civil3D:


 
Posted : July 22, 2017 9:58 pm
NCSpiralGuy
(@ncspiralguy)
Posts: 62
Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

One little, two little, three little endians ... 😀
You're talking about endians in Unicode encodings. That involves writing an integer representing a character, such as '??', with the bytes in some order. In the geoid file, the number representing an elevation, or the latitude, longitude, or number of columns or rows in the header, is written with the bytes in some order.


 
Posted : July 23, 2017 11:05 am
peter-ehlert
(@peter-ehlert)
Posts: 2958
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

NCSpiralGuy, post: 438266, member: 12287 wrote: One little, two little, three little endians ...

coffee in the nasal passages burns, hot coffee is worse


 
Posted : July 23, 2017 11:14 am
NCSpiralGuy
(@ncspiralguy)
Posts: 62
Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Peter, did you try it? How is it?


 
Posted : July 26, 2017 5:22 pm

Jim in AZ
(@jim-in-az)
Posts: 3374
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

paden cash, post: 438088, member: 20 wrote: There must be a difference in the vernacular...but around here a 'big-endian machine' usually refers to the honored 80 c.I. flathead Indian Chief.

I knew this was coming - what a beaut!! I can almost hear it blowing down the highway...


 
Posted : July 26, 2017 5:51 pm
loyal
(@loyal)
Posts: 3735
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Anyone remember...EBCDIC?

https://en.wikipedia.org/wiki/EBCDIC


 
Posted : July 26, 2017 6:26 pm
peter-ehlert
(@peter-ehlert)
Posts: 2958
Member
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

NCSpiralGuy, post: 438775, member: 12287 wrote: Peter, did you try it? How is it?

sorry but no, I got involved in something else. It is on my todo list


 
Posted : July 26, 2017 7:33 pm
NCSpiralGuy
(@ncspiralguy)
Posts: 62
Member
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

I've fixed some bugs in contour drawing. The latest version is at http://bezitopo.org/bezitopo-0.1.2.html .

Sometime soon I'm going to implement breaklines. What should a breakline file (separate from the point file) look like?


 
Posted : September 4, 2017 9:04 pm