Hi,
I've been fighting this one all day and am fairly sure it's a bug now,
though I don't know if it's in Google Earth or GeoServer.
I have a MySQL datastore which I am using to serve up vector data
using the geometry types. For the purposes of testing I am trying to
serve one polygon (four vertices). Because I'm new to spatial geometry
in a DB I nabbed an example from the internet and it worked fine. But
after fiddling around with some things and using my own data, I
discovered my data wouldn't appear in Google Earth when it was being
sent with a Network Link (works as an image overlay though). Yet the
original data would. After much tinkering I've got it down to the
problem being somehow in the co-ordinates themselves.
This is the original SQL query which I nabbed off the internet:
insert into geoserver_test (the_geom, fid, description) values
(GeomFromText('POLYGON((
153.01598489285 -27.47432304082,
153.01693975925 -27.473799504861,
153.01699340343 -27.473918490525,
153.01602780819 -27.47438967249,
153.01598489285 -27.47432304082
))'),1,'37 Merivale St, South Brisbane 4101, Queensland, Australia')
This is my modified one:
insert into geoserver_test (the_geom, fid, description) values
(GeomFromText('POLYGON((
-4.310576005553553 52.957605911543752,
-4.317493454951753 52.955528839528505,
-4.318744039241856 52.956916228638029,
-4.313922992914573 52.958655814284420,
-4.310576005553553 52.957605911543752
))'),1,'37 Merivale St, South Brisbane 4101, Queensland, Australia')
As you can see, they're identical except for the co-ordinates (the
first is in Australia, the second, Wales, UK) - I did re-generate the
bounding boxes. Both render fine using the OpenLayers, SVG and PDF on
the demo page, and when I insert them as an Image Overlay in Google
Earth they work there too, but for some reason when I use them as a
KML or KML_reflect WMS'd NetworkLink to Google Earth, only the first
(Australia) one works.
Having an SRID in there doesn't make any difference, and I tried
changing the co-ords to a couple of others I have. Nor would it show
the original 900 rows in the DB I originally had down as the dataset.
GeoServer: 1.7.5 with mysql extension;
Google Earth 4.3.7284.3916 (beta) - also 5.0.11733.9347 (just upgraded
to the latest version).
As noted, I don't know if it's Google Earth or Geoserver. because the
data sent in the network link is gibberish, so I just decided to ask
here first and the GE forums second. Any guesses?
If someone wants to try to recreate it, the create-table sql is:
CREATE TABLE `geoserver_test` (
`the_geom` geometry NOT NULL,
`fid` varchar(255) NOT NULL,
`description` varchar(2000) default NULL,
PRIMARY KEY (`fid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Thanks,
Jonathan