Hi,
I'm not able to display linestrings (in Geoserver preview) from my postgis
database. For points it worked almost out-of-the-box.
My table looks like this:
mmsi_nb | integer |
track | geometry |
first_point | geometry |
Track is the linestring I want to display in the Geoserver preview.
I thought that Geoserver was confused when I had two geometries, so I made a
view of only the mmsi_nb and track columns.
mmsi_nb | integer |
track | geometry |
View definition:
SELECT ship_track.mmsi_nb, ship_track.track
FROM ship_track
WHERE numpoints(ship_track.track) > 2;
and inserted some metadata into geometry_columns, but no luck with that
either.
I use the default_line style.
Does anyone have some experience or know about some docs with this topic.
cheers
Jorn
Hi,
I did some experiments with MapServer which is a little bit more verbose about
issues.
I found that I needed a oid column in my table, so I made a new view and
inserted the view into the geometry_columns table.
The view:
create or replace view my_ship_track_view (oid,track) as select mmsi_nb, track
from ship_track where numpoints(track)>2;
insert into geometry_columns values ('','public',
'my_ship_track_view','track',2,4326,'LINESTRING');
Now it works!
cheers
Jorn
On Thursday 23 March 2006 15:37, Jørn Vegard Røsnes wrote:
Hi,
I'm not able to display linestrings (in Geoserver preview) from my postgis
database. For points it worked almost out-of-the-box.
My table looks like this:
mmsi_nb | integer |
track | geometry |
first_point | geometry |
Track is the linestring I want to display in the Geoserver preview.
I thought that Geoserver was confused when I had two geometries, so I made
a view of only the mmsi_nb and track columns.
mmsi_nb | integer |
track | geometry |
View definition:
SELECT ship_track.mmsi_nb, ship_track.track
FROM ship_track
WHERE numpoints(ship_track.track) > 2;
and inserted some metadata into geometry_columns, but no luck with that
either.
I use the default_line style.
Does anyone have some experience or know about some docs with this topic.
cheers
Jorn
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live
webcast and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
J0rn,
The most recent versions of postgresql no longer put the "oid" column in a table by default.
Yes, its a big hastle. The fix isnt trivial since you do need a primary key of sometype for the table.
I think justin going to be doing some postgis datastore work next month (http://jira.codehaus.org/browse/GEOS-597) - he's aware of this issue so he might fix it (or at least make the errors more obvious) when he fixes that.
I've personally run into it quite a few times, so I'd like to see something happen on it. Its a major pain.
dave