I have a really strange problem which I don't know how to solve. I have shp file I've import into PostGIS using PostGIS Loader (made sure the srs is 4326 same is shp file) .
In geoserver (2.6.1) I've created a postgres store and published the table I've imported , set it SRS (WGS84) and style (default Polygon).
Now this is where things go weird and I have no idea how to approach this problem:
If I Preview the layer via WFS (KML/GeoJson/CSV etc...) I get the txt files with all features inside.
If I try to preview via openlayers or any other WMS (like geotiff) either I see empty map or get error
When I create a store of shp files with the data I've imported , it shows fine as wms.
Here is example that I do see features via wfs (csv) but error in wms.
Any idea ?!
EDIT 1: It was pointed out in comments that "width=78450&height=330" is a strange size (although this is what geoserver auto generate in preview) so I've manually edited the request to :
and now I get empty image:
Since I do see the data in the shp files preview :
I tend to think that the problem is somewhere from reading the data from PostGIS.
Last thing I did is comparing the shp layer settings to the postgis layer settings but I don't see anything that might hint on the problem I have:
I've checked geoserver log and noticed that the following query returns null:
SELECT encode(ST_AsBinary(ST_Simplify(ST_Force_2D("the_geom"), 0.002246433788820923)),'base64') as "the_geom" FROM datatable
Now , the_geom column is geometry type and is not null . When running ST_Simplify it brings back null :
This is working :
SELECT ST_Force_2D("the_geom") as "the_geom" FROM "public"."datatable"
This brings the nulls :
SELECT ST_Simplify(ST_Force_2D("the_geom"), 0.002246433788820923) as "the_geom" FROM "public"."datatable"
Any idea why ?