[udig-devel] PostGIS layer won't render

Jesse Eichar jeichar at refractions.net
Fri Aug 4 08:08:24 PDT 2006


Hi Tomi,

It appears that at least part of the problem stems from the fact that  
one of the layers you are using does not have a CRS associated with  
it.  When a layer doesn't have a CRS it defaults to "Cartesian"   
unfortunately I've been having problems with that because there is  
currently no way to transform between WGS84 and Cartesian...

The other possibility is that the CRS of one of you geometries is  
Cartesian... Although that seems rather unusual to me.

I am going to have to look into the problem to see if I can fix that  
issue.  How ever I do not beleive that is the issue with the Postgis  
Layers.  I have to be honest with you I've never tested a FeatureType  
with multiple geometries.  While theoretically it shouldn't matter...  
perhaps it does.  I'm sure Cory can find out more about that.

I'm looking at the error log and it appears that you don't have write  
access to the directory where the shapefile resides and an error is  
occurring because the shapefile datastore is trying to write to the  
directory... It shouldn't be doing this and is a bug, but even after  
I fix that issue you will have much better performance if you allow  
uDig to index your shapefiles.

Jesse


On 4-Aug-06, at 12:21 AM, Tomi Pieviläinen wrote:

>> The "geometry_columns" table will tell us which columns have spatial
>> data.  I am uncertain how multiple spatial columns would be handled,
>> but presumably the first one would be used.
>>
>> Could you send me a copy of your log file? (in uDig, Help > About >
>> Configuration Details > View Error Log).   What version of uDig,
>> Postgres, and PostGIS are you using?  Is the PostGIS publically
>> accessible (i'd like to hit it), and if not, could you send some  
>> details
>> about the table structure?
>>
>> Thanks,
>> Cory.
>
> Thanks for the quick reply, Cory.
>
> I had the error then working with a shapefile with the PostGIS
> connection, so I tried to reproduce a clean error (just PostGIS) both
> with the udig-1.0.6 and 1.1-RC2.  Stable version doesn't do anything,
> no renders, no errors.  Shows the connection in layers, though. RC
> shows one square at the origo, but nothing else.
>
> Feature count gets the correct number in both versions, zoom to layer
> gives ridiculously zoomed out picture.
>
> Running Debian Unstable with PostGIS 1.1.3-1 and PostgreSQL 8.1.4-5.
>
> Database isn't public, but the table schema is given in the following
> SQL-snippet, that shows the creation:
>
> CREATE TABLE images ( id serial PRIMARY KEY, filename varchar(64) NOT
> NULL, created_at timestamp NOT NULL, orientation integer, thumbnail
> bytea NOT NULL, image bytea NOT NULL,
>         image_type_id integer NOT NULL REFERENCES image_types (id) ON
>         DELETE RESTRICT);
>
> SELECT AddGeometryColumn('', 'images','wgs84location',4326,'POINT',2);
> SELECT AddGeometryColumn('', 'images','kkjlocation',2392,'POINT',2);
> SELECT AddGeometryColumn('', 'images','hesalocation',-1,'POINT',2)
>
> The data is images taken with GPS metadata, the wgs84 is already
> there, other two coordinate systems are precalculated when importing
> the data to the database.
>
> When I tried again with the same shapefile, I got these errors:
> http://paste.lisp.org/display/23631
>
> Seems like the error comes only when I try to zoom-to-layer.
>
> -Tomi Pieviläinen
>
> -- 
> I will sit down now, but the time will come when you will hear me.
> - Benjamin Disraeli, 1st Earl of Beaconsfield
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



More information about the udig-devel mailing list