開放街圖標誌 OpenStreetMap 開放街圖

Brasil Coordinates Transform

於 2010年一月 1日 由 h4ck3rm1k3English發表。 上一次更新在 2010年一月 2日。

Skippern asked me to help him with some autocad files of Vitoria, ES, Brasil.
They were donated in an unreadable format.
I had asked who could convert the file, and Balrog-Kun was able to do that very quickly. osm.org/user/balrog-kun
osm.org/user/h4ck3rm1k3/diary/9096

Then I had the dfx files, which are ascii records. with the tool from dime dxf2vrml/dxf2vrml I could convert the dfx to vrml, which gives me the points and the ways, no names.





I have been debugging the code from dime, and found that the MText and Hatch records are not being translated, which I am working on hacking. That means that when I am finished, we will have a tool to automate the conversion of DFX to OSM for this town. I want to be able to produce the streets and areas from the autocad file.

Now the first step was to get the projection of the points into lat/long. This is the second time I had to use the cs2cs tool and it was easier.
The trick is to get the parameters right :

cs2cs +proj=utm +south +ellps=intl +zone=24K +units=m +proj=tmerc -f "%.7f

Here is an example convert :
echo 364786.8965740744 7753334.811439441 | cs2cs +proj=utm +south +ellps=intl +zone=24K +units=m +proj=tmerc -f "%.7f"

results are: (long, lat )
-40.2950446 -20.3128901 0.0000000

see also :

With this tool, you just enter in the coords and get the UTM zone to plug into the parameters of the UTM tool!
http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html

Take the deg, min seconds and plug it in here to get the utm
http://www.cibolasar.org/UTMConverter.shtml

another page :
http://www.dmap.co.uk/ll2tm.htm

Here are some pictures :

What I did :

1. took the output of the dfx2 and extracted out the points. (../openstreetmap/brazil/Planimetria_de_Vitoria-points.osm)
358245.88 7753585.5
358246.06 7753584

2. ran cs2cs to convert the data:
cat ../openstreetmap/brazil/Planimetria_de_Vitoria-points.osm | cs2cs +proj=utm +south +ellps=intl +zone=24K +units=m +proj=tmerc -f "%.7f" | perl parse.pl > test.osm

3. The perl script produces a osm file:

     my $id=0;

print "\n";
while (<>)
{
chomp;
$id--;
if (/([\-\d\.]+) ([\-\d\.]+) ([\-\d\.]+)/)
{
print "\n";
}
else{
die $_;
}

}
print "\n";

位置: Enseada do Suá, Vitória, Região Geográfica Imediata de Vitória, Greater Vitória, Região Geográfica Intermediária de Vitória, Espírito Santo, Southeast Region, Brazil
電子郵件圖示 藍天圖示 Facebook 圖示 LinkedIn 圖示 乳齒象圖示 Telegram 圖示 X 圖示

登入 來留下評論