cool, i found out what went wrong.<br>my colleage used arcview to combine 2 shapefiles, that do not have all fields in common. The resulting shapefile has all the fileds, but for booleans the fields are left blank, although it shows as FALSE in the arcview table viewer (some default, i guess).
<br>A solution was to calculate the fields with their own value [microrelie] = [microrelie] (which of course introduces incorrect data)<br><br>But, this is a situation which could still easily occur when you do have serious data, especially if you edit the values that default to false to represent the 'truth'. I mean: where it should be true you change it, where it should be false, you don't. Then you can't convert your data with shp2pgsql anymore. (tested that, only the values themselves are changed).
<br><br>I guess you want to don't support, or actively warn for, illegal DBF content?<br><br>Cheers,<br><br>WBL<br><br><br><br><br><div class="gmail_quote">On Dec 13, 2007 10:48 PM, Tom Glancy <<a href="mailto:Tom.Glancy@dnr.state.mn.us">
Tom.Glancy@dnr.state.mn.us</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div style="margin: 4px 4px 1px; font-family: Trebuchet MS; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<div>I thought I'd reply directly.  You can open your dbf file with a hex editor. I use the Free Hex Editor from <a href="http://www.hhdsoftware.com/Products/home/hex-editor-free.html" target="_blank">http://www.hhdsoftware.com/Products/home/hex-editor-free.html
</a> </div>
<div> </div>
<div>The dbf format is well documented and straight forward. First, I opened your dbf in OpenOffice Calc because that program shows me the column names, data type and width. Then I opened the file with the hex editor, scrolled through the header info and found the single record in the file. Then it was a matter of counting characters until I got to the microrelie and macrorelie fields.
</div>
<div> </div>
<div>The dbf fields and records are all fixed width.</div>
<div> </div>
<div>Attached is a screen shot of the editor...</div>
<div> </div>
<div>Regards,</div>
<div>Tom</div>
<div> </div>
<div> </div>
<div><br><br>>>> "Willy-Bas Loos" <<a href="mailto:willybas@gmail.com" target="_blank">willybas@gmail.com</a>> 12/13/2007 2:41 PM >>><div><div></div><div class="Wj3C7c"><br>thanks.<br>how can you tell?
<br><br></div></div></div><div><div></div><div class="Wj3C7c">
<div class="gmail_quote">On Dec 13, 2007 6:17 PM, Tom Glancy <<a href="mailto:Tom.Glancy@dnr.state.mn.us" target="_blank">Tom.Glancy@dnr.state.mn.us</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div>Your dbf file contains spaces (0x20) in the "microrelie" boolean and "macrorelie" boolean fields. The representation of NULL in boolean fields is a question mark (0x3f). Allowable characters in a boolean field are Y,y,N,n,T,t,F,f,? 
</div>
<div> </div>
<div>It looks like your dbf is broken.</div>
<div> </div>
<div>Regards,</div>
<div>Tom</div>
<div> </div>
<div><br>>>> "Willy-Bas Loos" <<a href="mailto:willybas@gmail.com" target="_blank">willybas@gmail.com</a>> 12/13/2007 6:15 AM >>> 
<div>
<div></div>
<div><br>here's the rest of the shapefile (still one record, attached). <br><br></div></div></div>
<div>
<div></div>
<div>
<div class="gmail_quote">On Dec 13, 2007 11:04 AM, Willy-Bas Loos <<a href="mailto:willybas@gmail.com" target="_blank">willybas@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>I have a small problem wit shp2pgsql, it doesn't convert my colleague's shapefile correctly. 
<br>I've attached the 1rec shapefile and the shp2pgsql result in this mail, hope that works.<br><br>I'm using this version: RCSID: $Id: shp2pgsql.c,v <a href="http://1.88.2.7/" target="_blank">1.88.2.7</a> 2005/08/29 22:36:14 strk Exp $ 
<br>on windows XP.<br><br>The problem is in two of the boolean fields: "microrelie" boolean and "macrorelie" boolean. <br>They are both created, but their values don't make it into the INSERT statement. They turn up as empty strings, which is illegal SQL. 
<br>There are lots (37) of fields in the shapefile.<br>12 other boolean fields are handled correctly. <br>The "bad" fields are the 24th and the 25th field.<br><br>is this some bug?<br><font color="#888888"><br>WBL 
<br></font></blockquote></div><br></div></div></div><br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net
</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br></blockquote></div><br></div></div></div>
</blockquote></div><br>