2012/12/22 Edward Vanden Berghe <evberghe@gmail.com>

> Sorry, me again.
>
> The PostGIS driver might be missing from the pre-compiled version of rgdal
> for Windows, but the ODBC driver isn't; so that should be an alternative to
> using a driver specific for PostGIS. But as already mentioned, the
> following R statement
>
> > p <- readOGR(dsn="ODBC:PostgreSQL VM", "geo.cs10d")
>
> results in the following output:
>
> Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding) :
>   Multiple # dimensions:
>
> I checked the log files of the postgresql server; there seems to be an sql
> statement asking for a non-existing field:
>
> 192.168.56.101(49436): evberghe: 2012-12-22 12:27:00 EST: LOG:  connection
> authorized: user=evberghe database=obis
> 192.168.56.101(49436): evberghe: 2012-12-22 12:27:00 EST: ERROR:  column
> "geometry_type" does not exist at character 41
> 192.168.56.101(49436): evberghe: 2012-12-22 12:27:00 EST: STATEMENT:
>  SELECT f_table_name, f_geometry_column, geometry_type FROM geometry_columns
>
>
> I assume rgdal is checking whether all records have the same number of
> dimensions and the same geometry type. The geometry type is in a field
> 'type', not in a field 'geometry_type'.
>
> Is it because the PostGIS driver is not available that the ODBC driver
> doesn't know the correct field in which to look for the geometry type?
>
> I could ask the PostgreSQL server to log everything and post the relevant
> sections of the log if this would help.
>
> Edward
>

This log says that your geometry table is missing geometry_type attribute
eg. POINT, POLYGON, LINESTRING...

BTW you can install QGis, connect it to your Postgis server, load your
table as a layer and then export everything in a shapefile using QGis gui.

-r

PS switch to linux :-)

	[[alternative HTML version deleted]]

