I have looked at your data and the book example, the problem is that there are three invalid polygons in data that are processed in the book:
GSHHS_l_L1.shp
ID = 92-W
POLYGON ((-180.0 71.514793999999995,-179.69008299999999 71.577888999999999,-178.648889 71.577416999999997,-178.40644399999999 71.549916999999994,-177.406306 71.244167000000004,-177.877444 71.022889000000006,-179.500111 70.863749999999996,-179.93011100000001 70.979583000000005,-180.0 70.962072000000006))
ID = 486-W
POLYGON ((-180.0 -16.799126,-179.84419399999999 -16.691278,-179.80041700000001 -16.789193999999998,-179.850472 -16.878361000000002,-180.0 -16.959561))
GSHHS_l_L2.shp
ID = 7333-W
POLYGON ((-180.0 65.393473,-179.76583299999999 65.428332999999995,-179.95416700000001 65.385555999999994,-179.90972199999999 65.316389,-180.0 65.321635))
Because this is an example it would be easiest to delete those polygons from the dataset or just add one if statement in you code
if geometry.IsValid():
cursor.execute("INSERT INTO gshhs (level, geom) VALUES (%s, ST_GeomFromText(%s, 4326))", (level, wkt))
I've updated the instructions on the website. Hope it's a bit clearer.
Nicklas is right you don't really need the makepostgis.bat if you just copy the like folders to your postgresql install (you could also remark out the create db in it since it does copy all the files). You should be able to just overlay ontop since the zip structure is the same as standard windows enterprisedb packaged PostgreSQL binaries. What I neglected to mention in the instructions is that you do still need the binaries and libs. This I have updated so its should be clearer.
We don't have the create extension approach as the official for PostgreSQL 9.1 yet since we are working out some issues with using the ALTER EXTENSION postgis UPGRADE .. syntax
which is more of an issue with PostGIS 2.0 non-released since there are no official freeze points yet. In the currently packaged it works fine but its harder to ensure it works given all the flux of stuff going on in PostGIS 2.0 in the past month.
Best Answer
As far as I know you can not currently do this. There are numerious mentions of
collada2pgsql
on a dated blog called "PostGIS & 3D" last published in 2007 that mention a tool that would facilitate this, but no one knows where the tool is currently available (if anywhere).I was able to find this service which is powered by Cesium
But the service failed for me.
You can find the source for the backend for the service Cesium service on a project called COLLADA2GLTF which seems to be reasonably maintained. However, even if it worked I'm unsure of how to get the GL Transmission Format (gLTF) that it produces into PostGIS. The Java project importer-exporter claims to support PostGIS and gLTF.
Currently it seems like you'd have to have Collada2GLFT and then the import-exporter to get this to work.