MapInfo to Google Earth error

654 views
Skip to first unread message

jmsed

unread,
Jan 18, 2008, 4:22:13 PM1/18/08
to MapInfo-L
I am having an issue when converting a MapInfo .TAB file to Google
Earth .KML file. I am using MIPro 8.0. After conversion is complete
there is a portion of my line missing in the .KML file. I have tried
clearing my "temp" cache, and also re-converting just the piece that
is missing with the same results. Has anyone out there experienced the
same problem ?? Or any idea how to solve this ?? Thanks

jmsed

unread,
Jan 18, 2008, 5:40:20 PM1/18/08
to MapInfo-L
I have found the answer..... save the file output name as defaulted in
save window, change to what you want afterward.

Sue Beetlestone

unread,
Jan 21, 2008, 4:14:46 AM1/21/08
to mapi...@googlegroups.com
We have had a problem with "doughnut polygons" when converting to .KML - it
doesn't seem to be able to cope.
No idea how to solve though - we haven't succeeded yet and would be glad to
know whether anyone else has.

Regards

Sue

-----------------------------------------
Cyngor Sir Powys County Council
www.powys.gov.uk

Mae'r e bost hwn ac unrhyw atodiad iddo yn gyfrinachol ac fe'i
bwriedir ar gyfer y sawl a enwir arno yn unig. Gall gynnwys
gwybodaeth freintiedig. Os yw wedi eich cyrraedd trwy gamgymeriad
ni ellwch ei gopio, ei ddosbarthu na'i ddangos i unrhyw un arall a
dylech gysylltu gyda Cyngor Sir Powys ar unwaith.

Mae unrhyw gynnwys nad yw'n ymwneud gyda busnes swyddogol Cyngor
Sir Powys yn bersonol i'r awdur ac nid yw'n awdurdodedig gan y
Cyngor.

This e mail and any attachments are confidential and intended for
the named recipient only. The content may contain privileged
information. If it has reached you by mistake, you should not copy,
distribute or show the content to anyone but should contact Powys
County Council at once.

Any content that is not pertinent to Powys County Council business
is personal to the author, and is not necessarily the view of the
Council.

Bill Thoen

unread,
Jan 21, 2008, 11:56:56 AM1/21/08
to mapi...@googlegroups.com
I've been looking into the source code to GElink and at the point where
it handles the "doughnut holes" in versions higher than 8.5 build 40, it
calls RegionInfo() to see if the points that make the hole are ordered
doesil (clockwise). If they are it reads them in reverse sequence so
that the points around the holes are all ordered widdershins
(counterclockwise). In versions older than 8.5 it doesn't bother, so
maybe Google Earth needs interior holes ordered a certain way (probably
counterclockwise).


--
- Bill Thoen
GISnet - www.gisnet.com
303-786-9961

Uffe Kousgaard

unread,
Jan 21, 2008, 12:14:05 PM1/21/08
to mapinfo-l
> In versions older than 8.5 it doesn't bother, so maybe Google Earth needs
> interior holes ordered a certain way (probably counterclockwise).

My experience shows no requirements on ordering of nodes. Just like GML and
MIF. Only SHP files has such requirement.

Regards
Uffe Kousgaard

CB

unread,
Jan 21, 2008, 3:14:15 PM1/21/08
to MapInfo-L
> I've been looking into the source code to GElink and at the point where
> it handles the "doughnut holes" in versions higher than 8.5 build 40, it
> calls RegionInfo() to see if the points that make the hole are ordered
> doesil (clockwise). If they are it reads them in reverse sequence so
> that the points around the holes are all ordered widdershins
> (counterclockwise). In versions older than 8.5 it doesn't bother, so
> maybe Google Earth needs interior holes ordered a certain way (probably
> counterclockwise).

Bill is correct. MapInfo Pro doesn't care whether points in a polygon
are stored 'clockwise' or not, but Google Earth does.
Prior to MIPro 8.5 (build 40) there was no way to tell, via MapBasic,
if a polygon was 'clockwise' or not.

Charles Bates
Pitney Bowes MapInfo

Gentreau

unread,
Jan 21, 2008, 4:54:39 PM1/21/08
to mapi...@googlegroups.com

Google Earth does have a "feature" when drawing regions.

If you want the region to be extruded, then it MUST be created
anti-clockwise in the kml file or it wont display correctly.
I spent ages struggling with that one.....

Gentreau.

Uffe Kousgaard

unread,
Jan 22, 2008, 5:40:49 PM1/22/08
to mapi...@googlegroups.com
From: "CB" <ccb...@gmail.com>

> Bill is correct. MapInfo Pro doesn't care whether points in a polygon
> are stored 'clockwise' or not, but Google Earth does.

Please have a look at the KML specification for polygons:
http://code.google.com/apis/kml/documentation/kml_tags_21.html#polygon

There are no requirements for clockwise or counter-clockwise.

Anyone can try to open the 2 KML files I have attached. ComplexPoly.kml is
the original and in the ComplexPoly2.kml I have manually swapped the order
of the nodes. Both show up quite nicely in Google Earth.

Kind regards

Uffe Kousgaard
www.routeware.dk

complexPoly.kml
complexPoly2.kml

David Reid

unread,
Jan 22, 2008, 7:24:21 PM1/22/08
to mapi...@googlegroups.com
FWIW, I receive fatal errors attempting to open both files.

"Open of file "C:\..\ComplexPoly.kml" failed: Parse error at line 1, column
14:

XML declaration not well-formed"


Hope that finding helps


David Reid


-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On
Behalf Of Uffe Kousgaard

Uffe Kousgaard

unread,
Jan 23, 2008, 1:17:44 AM1/23/08
to mapi...@googlegroups.com
Here is a (hopefully) better version.

For some reason the text "3D" had been added various places throughout the
file.

Regards
Uffe

complexPoly.kml
complexPoly2.kml

Uffe Kousgaard

unread,
Jan 23, 2008, 1:33:35 AM1/23/08
to mapi...@googlegroups.com
Sorry, the files keep getting changed by Google Groups or whatever it is.

Use these links instead:
http://80.62.72.182/complexPoly.kml
http://80.62.72.182/complexPoly2.kml

Ahmet DABANLI

unread,
Jan 23, 2008, 8:55:54 AM1/23/08
to mapi...@googlegroups.com
Hi,
maybe this helps
do not use space in your file name...
--
Ahmet DABANLI

Gentreau

unread,
Jan 23, 2008, 1:22:54 PM1/23/08
to mapi...@googlegroups.com

Uffe, what did you set in the kml files for <extrude> and <altitudeMode> ?

If altitudemode = relativeToGround and extrude = 1 then I have found that
you MUST draw the polygons anticlockwise.

I'd be glad if you tell me that GE have fixed this in the current version,
but when I was writing my kml export module about 6 months back it would not
display extruded, relativetoground regions correctly if they were drawn
clockwise.

Gentreau.

Uffe Kousgaard

unread,
Jan 23, 2008, 4:16:36 PM1/23/08
to mapi...@googlegroups.com
>
> Uffe, what did you set in the kml files for <extrude> and <altitudeMode> ?

They are not specified. You can see this inside the files if you download
them.

> I'd be glad if you tell me that GE have fixed this in the current version,
> but when I was writing my kml export module about 6 months back it would
> not
> display extruded, relativetoground regions correctly if they were drawn
> clockwise.

It could be something completely different that is causing you troubles.

Regards
Uffe

Gentreau

unread,
Jan 23, 2008, 5:25:39 PM1/23/08
to mapi...@googlegroups.com

Uffe,

Here's an example for you.
The 2 attached images show a pair of regions created with altitude mode =
relativeToGround and extrude =1
The first image has both regions defined anti-clockwise, they both display
correctly with correct colour.
The second image is a file where the only change is to reverse the order of
the southern region so that it is defined clockwise.

If you set altitudemode = clamptoground then this problem does not occur.

Gentreau.

-----Original Message-----
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On
Behalf Of Uffe Kousgaard
Sent: Wednesday, January 23, 2008 9:17 PM
To: mapi...@googlegroups.com
Subject: [MI-L] Re: MapInfo to Google Earth error


>

one-clockwise.jpg
anti-clockwise.jpg

Uffe Kousgaard

unread,
Jan 24, 2008, 1:46:52 AM1/24/08
to mapi...@googlegroups.com
You would probably have to report this to Google as a bug. Most likely
someone else has already noticed the problem here:
http://groups.google.com/group/Google-Maps-API

Regards
Uffe

Gentreau

unread,
Jan 24, 2008, 3:00:24 AM1/24/08
to mapi...@googlegroups.com

It seems to be already fairly well known in the kml developer group....

http://groups.google.com/group/kml-support/search?group=kml-support&q=clockw
ise&qt_g=Search+this+group

Gentreau

unread,
Jan 24, 2008, 3:09:25 AM1/24/08
to mapi...@googlegroups.com

And here,
http://groups.google.com/group/kml-support-getting-started/search?group=kml-
support-getting-started&q=%2Bwinding+%2Border&qt_g=Search+this+category

Apparently it's correct name is winding-order.

George

unread,
Nov 29, 2011, 2:52:21 PM11/29/11
to mapi...@googlegroups.com
Can anyone get the Google Earth link to convert regions with islands (holes, doughnuts etc.) in them?  I can not get it to work no matter which direction I draw the polygons - ie winding direction.  The KML file that is written by GELink only creates a polyline feature of one of the islands and not a polygon with islands.  

Interestingly, when I import the .TAB directly into GE Pro the polygon with islands show up and the KML written correctly shows the polygon with both outerBoundaryIs and innerBoundaryIs tags.  

It appears GElink need MI regions created in a very specific way - can someone explain how to do this successfully?

You may ask why bother with the GELink at all if you can get what you want via importing the .TAB directly?  The GELink allows you to specify which attribute fields to include on the import which saves having to do a save copy as and blow away attributes you don't want in GE.


I am using MI 8.5.1b and the latest GElink.mbx from the PB MI website.

Any help would be greatly appreciated.

rinus deurloo

unread,
Nov 29, 2011, 4:12:11 PM11/29/11
to mapi...@googlegroups.com
Hi George,

Earlier this year Peter Horsbøll Møller pointed me to the best version of GELink, which at least solved all my problems with complicated polygons:

"GELink does contain some .NET stuff as well, so you'll find it here:
C:\Program Files\MapBasic\Samples\DOTNET\GoogleConnect
where C:\Program Files\MapBasic\ is where you installed MapBasic"

Kind regards,
Rinus Deurloo

University of Amsterdam


2011/11/29 George <putn...@gmail.com>

--
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

George

unread,
Nov 30, 2011, 5:14:12 PM11/30/11
to MapInfo-L
Hi Rinus,

It appears when compiled this version of GELink needs MI 10.5 to run.
At least that's the error I am getting.

I am running MI v8.5.1B - Release Build 2. Is there an "improved"
GElink utility will run in the version I have?

Thanks,

-George

On Nov 29, 2:12 pm, rinus deurloo <rinus.deur...@gmail.com> wrote:
> Hi George,
>
> Earlier this year Peter Horsbøll Møller pointed me to the best version of
> GELink, which at least solved all my problems with complicated polygons:
>
> "GELink does contain some .NET stuff as well, so you'll find it here:
> C:\Program Files\MapBasic\Samples\DOTNET\GoogleConnect
> where C:\Program Files\MapBasic\ is where you installed MapBasic"
>
> Kind regards,
> Rinus Deurloo
> University of Amsterdam
>

> 2011/11/29 George <putna...@gmail.com>


>
>
>
>
>
>
>
> > Can anyone get the Google Earth link to convert regions with islands
> > (holes, doughnuts etc.) in them?  I can not get it to work no matter which
> > direction I draw the polygons - ie winding direction.  The KML file that is

> > written by GELink only creates a polyline feature of *one *of the islands

rinus deurloo

unread,
Dec 1, 2011, 4:02:00 AM12/1/11
to mapi...@googlegroups.com
George,

Unfortunately I do not have an improved utility for version MI 8.5. It runs in my version MI v.10.0.1 Release Build 220. Maybe you can rewrite the essential module GELink_ExportKML a bit and remove the unnecessary other modules.

Rinus.
=====

2011/11/30 George <putn...@gmail.com>

Bushy

unread,
Dec 4, 2011, 5:00:57 PM12/4/11
to mapi...@googlegroups.com
If not done so already, just take a quick look at "GE Scene", Written by
Peter Doyle of Brisbane here in Australia.
Is a wonderful little utility to overlay MI imagery on top of Google Earth.

Current version is 1.5c, (2008)

http://www.directionsmag.com/files/view/gescene-v15/139485

Reply all
Reply to author
Forward
0 new messages