GPSFileDepot Forums

General Category => Map Making Support => Topic started by: deepspace on December 04, 2008, 01:16:12 PM

Title: can not see it
Post by: deepspace on December 04, 2008, 01:16:12 PM
Hi, Forgive me if this is obvious (I did search the forum for a answer first) but I am trying to make a top mapo of just the Olympic Peninsula in my first attempt at this.
I think I have everything I need. When attempting to work with the NHD files in the command line I get this:

C:\Program Files\PostgreSQL\8.3\bin>shp2pgsql "C:\My Documents\washington\hydro\
NHDArea.shp" NHD_Area > nhd_area.sql
C:\My Documents\washington\hydro\NHDArea.shp: shape (.shp) or index files (.shx)
can not be opened, will just import attribute data.
C:\My Documents\washington\hydro\NHDArea.shp: dbf file (.dbf) can not be opened.
C:\Program Files\PostgreSQL\8.3\bin>
As one cane see the path appears correct because of the initial action it takes but I can not get any where else. Does any one see the mistake. Thank you in advance for any help.
I have fw tool installed, when I drag the shape files to the merge .bat files the black command screen comes up but disappears so fast I can not read what it does.
Maybe it there?
Cheers-Marc
Title: Re: can not see it
Post by: -Oz- on December 04, 2008, 08:46:38 PM
At first glance it appears that there is a permission issue.

Are those shape files open when it tries to access them?

Also, normally C:\My Documents doesn't actually exist.  Its normally C:\Documents and Settings\User\My Documents

That is why I work in a C:\maps folder. Makes life a lot easier.  matter of fact I'm pretty sure that's the error.
Title: Re: can not see it
Post by: deepspace on December 05, 2008, 07:19:27 AM
That makes a lot of sense. I will work on today. Thanks for the quick help.
Cheers-Marc
Title: Re: can not see it
Post by: deepspace on December 07, 2008, 11:51:47 AM
Ok that worked, I got to the next step no problems but trying to export it to the correct folder as .shp file keeps bringing up a error like:
C:\Program Files\PostgreSQL\8.3\bin>pgsql2shp  -f "C:\washington\hydro\Area.shp"
Waterbody.shp" -u postgres postgis nhd_waterbody

**ERROR** invalid option or command parameters

RCSID: $Id: pgsql2shp.c 2762 2008-04-10 14:44:26Z pramsey $ RELEASE: 1.3.3
USAGE: pgsql2shp [<options>] <database> [<schema>.]<table>
       pgsql2shp [<options>] <database> <query>
and of course it has a help file with the command letters.
I made sure the folders where not open so there would not be a permissions issue and get the same thing. Did I miss a step?
Cheers-Marc
Title: Re: can not see it
Post by: -Oz- on December 07, 2008, 09:03:53 PM
QuoteC:\Program Files\PostgreSQL\8.3\bin>pgsql2shp  -f "C:\washington\hydro\Area.shp"
Waterbody.shp"
-u postgres postgis nhd_waterbody

The red part seems like your issue.  You can't have The area" and waterbody.
Title: Re: can not see it
Post by: deepspace on December 08, 2008, 06:35:45 AM
not sure how I got those 2 in one line I tried so many things.
Here it is again with correct lines:

C:\Program Files\PostgreSQL\8.3\bin>pgsql2shp  -f "C:\washington\hydro\Area.shp"
-u postgres -p postgis nhd_area

**ERROR** invalid option or command parameters

RCSID: $Id: pgsql2shp.c 2762 2008-04-10 14:44:26Z pramsey $ RELEASE: 1.3.3
USAGE: pgsql2shp [<options>] <database> [<schema>.]<table>
       pgsql2shp [<options>] <database> <query>

OPTIONS:
  -f <filename>  Use this option to specify the name of the file
     to create.
  -h <host>  Allows you to specify connection to a database on a
     machine other than the default.
  -p <port>  Allows you to specify a database port other than the default.
  -P <password>  Connect to the database with the specified password.
  -u <user>  Connect to the database as the specified user.
  -g <geometry_column> Specify the geometry column to be exported.
  -b Use a binary cursor.
  -r Raw mode. Do not assume table has been created by
     the loader. This would not unescape attribute names
     and will not skip the 'gid' attribute.
  -k Keep postgresql identifiers case.
  -? Display this help screen.
Title: Re: can not see it
Post by: deepspace on December 08, 2008, 08:47:34 AM
Using the same methods everything worked out fine for transportation, but the hydro still has the same error. Thanks again for all the help, it feels as though I am almost there, great site.
Cheers-Marc
Title: Re: can not see it
Post by: deepspace on December 08, 2008, 08:54:37 AM
I found the error. Thank you again for the help.
Title: Re: can not see it
Post by: -Oz- on December 08, 2008, 06:15:54 PM
Glad you found it.  Was the order incorrect?  It seems like you were trying to do the wrong step with those parameters.
Title: Re: can not see it
Post by: deepspace on December 09, 2008, 07:24:19 AM
yes that was the error, case of can not see the problem staring right at the mistake. Now I am wrestling with what appears to be a common issue: DEM2TOPO and memory.
Read this post:    
http://forums.gpsfiledepot.com/index.php/topic,63.0.html (http://forums.gpsfiledepot.com/index.php/topic,63.0.html) but really it does not make sense to me how I control splitting the files into smaller segments with the command.
I searched the net and found no other solutions to make the dem files into say 4 small files instead of 1 huge one.
Cheers-Marc
Title: Re: can not see it
Post by: deepspace on December 09, 2008, 10:50:15 AM
well I actually mis-lead as to memory issue, problem is dem2topo gets to some point (say 1181 out 3417 intermediate contours) then just hangs there for hours doing nothing. So I need to use task manager to end the whole thing. I did turn off firewalls, anti virus programs in case they where some how interfering. Have you heard of such thing? Any suggestions?
Cheers-Marc
Title: Re: can not see it
Post by: maps4gps on December 09, 2008, 04:03:13 PM
I am using GM in a Vista environment.  At 75-80% memory usage, GM terminates without a message. 
Title: Re: can not see it
Post by: deepspace on December 09, 2008, 05:32:44 PM
I should have given more details. The DEM files are all about 235 megs, they have a lot of contours because of the Olympic mountains. I have the newest version of all of the software installed on a Toshiba laptop running xp with a gig of memory. I got the furthest on my last attempt all the way to 1411 out of 3417 intermediate contours.  ???
Cheers-Marc
Title: Re: can not see it
Post by: deepspace on December 10, 2008, 10:08:34 AM
I am wondering at this point if since IDL is not licensed and in demo mode if its timing out. Any chance any one knows about this?
Title: Re: can not see it
Post by: -Oz- on December 10, 2008, 09:54:35 PM
Have you tried using gdal_contour?  That is my new solution.  I wonder if it would work.

Third post down here has more details: http://forums.gpsfiledepot.com/index.php/topic,93.0.html
Title: Re: can not see it
Post by: deepspace on December 13, 2008, 09:53:35 AM
Thank you all for the help. I think I have it except when I try to create the .imp file I get a error the the layers must be ascending. I look at the properties and the layers are ascending. Is this common? Thanks-
Title: Re: can not see it
Post by: -Oz- on December 13, 2008, 04:33:01 PM
I assume you're using cgpsmapper at this point?

And what properties?  If you zip one of your .mp files and attach it to the post I can look at it for you.  Open the .mp files with notepad++ or wordpad.
Title: Re: can not see it
Post by: deepspace on December 14, 2008, 08:08:01 AM
from the header of the county boundaries
; Generated by GPSMapEdit 1.0.37.2

[IMG ID]
ID=
Name=
Preprocess=F
TreSize=1000
TreMargin=0.00000
RgnLimit=1024
POIIndex=Y
Copyright=2008 GPSFileDepot.com
DrawPriority=31
Marine=N
Levels=5
Level0=23
Level1=22
Level2=20
Level3=18
Level4=17
Zoom0=0
Zoom1=1
Zoom2=2
Zoom3=3
Zoom4=4
[END-IMG ID]:
Cheers-Marc
Title: Re: can not see it
Post by: -Oz- on December 14, 2008, 12:47:50 PM
The header is definitely correct.  I think the issue is actually in the files themselves (the [RGNxxx]; those can have levels too and I wonder if they're out of order.
Title: Re: can not see it
Post by: deepspace on December 15, 2008, 04:34:46 PM
got it sorted out, thanks!