Re: [MI-L] Mapinfo to google earth

983 views
Skip to first unread message

siddahrtha kamasani

unread,
Nov 15, 2012, 1:26:19 AM11/15/12
to mapi...@googlegroups.com
Hi Bhathiya,

Try attached tool.

Selected objects need to be exported into KML.

Short key to export into KML is "a".

Sidharth kamasani


On 15 November 2012 11:23, Bhathiya Pilanawithana <bhat...@gmail.com> wrote:
When  I export mapinfo to google earth, labels do not appear in google earth. Is there a solution?

--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en



--
Warm Regds
Sidharth Kamasani
ExportToKML.MBX

MEG

unread,
Oct 24, 2013, 4:18:01 PM10/24/13
to mapi...@googlegroups.com
I downloaded your ExporttoKML tool.  It is very nice and works great.
 
Is there a way to call your program from another MapBasic program and  pass parameters to it for the translation?  For example:
 
Call ExportToKML "C:\Data\polyline.tab" "C:\Data\polyline.kml"
 
If not does anyone know of something that can be used?
 
Thanks,
 
MEG

Brendan Stone

unread,
Oct 25, 2013, 5:41:34 AM10/25/13
to mapi...@googlegroups.com
You could use the command line program ogr2ogr.exe
e.g
ogr2ogr -f "KML" "X:\KML\example.KML" "X:\TAB\example.TAB"

More info:

Using MapBasic you could save the TAB and then call ogr2ogr with the correct parameters using "Run Program"

MEG

unread,
Oct 25, 2013, 8:31:19 AM10/25/13
to mapi...@googlegroups.com
Brendan:
 
Thanks for your response about the ogr2ogr utility.
 
I did a test and it created a KML.
 
The only issue is no matter what the line style in MapInfo, the KML line is a very thin RED line (which is hard to see). 
 
Is there a parameter to for the utility that transfers the MapInfo line style to the KML?  OR a parameter I can send in the command line that set it bolder in the KML?
 
It appears that the -lco NAME=VALUE: Layer creation option might be a way to set this feature.  If you have a link or know how to set this it would be appreciated.
 
Thanks,
 
MEG
 
 
 
 
 
 
Thanks,
 
MEG
 
 

Brendan Stone

unread,
Oct 29, 2013, 11:19:19 AM10/29/13
to mapi...@googlegroups.com
Which version of ogr2ogr are you using? You can check by running ogr2ogr.exe --version

I used the version that ships with QGIS Dufour (v 1.9.2) and the resulting KML files inherit the style of the feature in the TAB file.

When I used an older version of ogr2ogr (1.6.0) all the resulting KML files had the same style which I guess was ogr2ogr's default style. Can't remember what style it was exactly.

Hope that helps.

MEG

unread,
Oct 29, 2013, 1:05:22 PM10/29/13
to mapi...@googlegroups.com
Brendan:

Thanks for the response.
 
I checked and the version of GDAL is 1.7.0b2.  So I wonder if I'm setting something incorrectly?
 
The command was fairly simple
 
ogr2ogr -f "KML"  "X:\KML\example.KML" "X:\TAB\example.TAB"
 
I was thinking I could set a parameter for the KML file to set the width that would generate the code in the KML to look like:
 
<LineStyle> <color>DCABEC</color>  <width>5</width></LineStyle>.
 
However, I couldn't determine the correct syntax... the documentation is sketchy.
 
MEG
 
 
 
 

Brendan Stone

unread,
Nov 1, 2013, 12:04:19 PM11/1/13
to mapi...@googlegroups.com
Sorry, didn't see this.
I don't know if it's possible to apply a style via ogr2ogr, perhaps someone with more experience of ogr2ogr can advise.

I'd recommend you download QGIS (which is well worth having on your machine anyway) and use the ogr2ogr.exe that it includes.
This version will take the style of the MapInfo object and apply it to the KML file.

Ramon Perez

unread,
Nov 1, 2013, 12:38:57 PM11/1/13
to mapi...@googlegroups.com
Hi
I´m use this
1. Tools>Tool manager
2.Select "Google earth Connection Utility" (Select Loaded and Autoload)
3.Click Ok
4.Select the objects that you like send to google earth
5.Go to Map>Google Earth Link>Export To Google Earth
6.Select the option "Export selected objets (kml)"
7.Select the output path
8.Select the source place name (label)
9. Click Ok

Wait a minute while process is completed

The software willbe open the Google Earth with your data.

Best regards



2012/11/15 Bhathiya Pilanawithana <bhat...@gmail.com>

When  I export mapinfo to google earth, labels do not appear in google earth. Is there a solution?

--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en



--
Ramón B. Pérez Ulloa
Director de Soporte Técnico
Minera Cerro Quema, S.A.

Etore

unread,
Nov 1, 2013, 1:05:51 PM11/1/13
to mapi...@googlegroups.com
Sorry kamasani,

I couldn't run...could you get  .MB?
Reply all
Reply to author
Forward
0 new messages