OpenLayers data preview returns several countries information at the same time

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenLayers data preview returns several countries information at the same time

fvuong
Dear all,

I have a problem with Geoserver that I cannot resolve.

To summarize it:

1. I had a shapefile with all the countries that I imported directly as a shapefile into one layer. (the shapefile works fine and returns only one row)

2. I converted the shapefile to a mysql file thanks to shp2mysql. The sql script has been created (236 rows)  and I have imported it into MySQL.

2. I created the required workspace, store and layer. For the layer the following fields are available from the MySQL table:
- CNTRY_TERR (string)
- ISO_3_Code (String)
- ogc_geom (geometry)
- OGR_FID (Integer) [A dummy Primary Key]

3. But looking at the layer preview (with openlayers) a click on the map return several countries information. For example, clicking on the Russian Federation return the USA as well or Brazil and Kiribati.

It is not the case for all countries (some of them return only one row) and I could not find any information that could help me to solve this problem.

Has anybody got that kind of issue ?

Thanks a lot for your help.

Fred
Reply | Threaded
Open this post in threaded view
|

Re: OpenLayers data preview returns several countries information at the same time

fvuong
Forgot to mention that when opening the WMS with Quantum GIS, it was returning the proper information although it does not seem to work with Gaia.
Reply | Threaded
Open this post in threaded view
|

Re: OpenLayers data preview returns several countries information at the same time

fvuong
So I have been digging a little bit in the database and found a strange behaviour:

The two following queries give me the same result (New Zealand).

select * from geo where MBRContains(ogc_geom, GeomFromText('POINT(-4 -46)'));
select * from geo where MBRContains(ogc_geom, GeomFromText('POINT(4 -46)'));

So I feel that the negative sign is not taken into account.

I will keep you posted if I find more information.
Reply | Threaded
Open this post in threaded view
|

Re: OpenLayers data preview returns several countries information at the same time

fvuong
It seems that I have the same problem as this person

http://forums.mysql.com/read.php?23,415927,415927#REPLY

Unfortunately no answer was provided. Any idea ?

Thanks