Hi,<div>I'm a newby with this.</div><div><br></div><div>I have a shape file that I upload to postGis Database, with the windows program "postgis and dbf loader".</div><div>Then I create a test with MS4W environment.</div>

<div><br></div><div>I setup a LOG in the map file.</div><div>And the error y following:</div><div><br></div><div><b><code></b></div><div><div>[Sat Jul 30 01:45:34 2011].750000 CGI Request 1 on process 4620</div><div>

[Sat Jul 30 01:45:34 2011].750000 msDrawMap(): WMS/WFS set-up and query, 0.000s</div><div>[Sat Jul 30 01:45:34 2011].906000 msPostGISLayerWhichShapes(): Query error. Error (ERROR:  geometry requires more points</div><div>

) executing query: select encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') as geom,"gid" from t_parcelas where the_geom && GeomFromText('POLYGON((5600615.254754 5725111.70807103,5600615.254754 5739818.70784397,5620240.983548 5739818.70784397,5620240.983548 5725111.70807103,5600615.254754 5725111.70807103))',find_srid('','t_parcelas','the_geom'))</div>

<div>[Sat Jul 30 01:45:34 2011].906000 msDrawMap(): Image handling error. Failed to draw layer named 'Parcelas'.</div><div>[Sat Jul 30 01:45:34 2011].906000 msFreeMap(): freeing map at 01DBAD80.</div></div><div><br>

</div><div><b></code></b><br clear="all"><br></div><div>This is the layer section in the map file</div><div><b><map></b></div><div><div>...</div><div> LAYER # States polygon layer begins here</div><div>    NAME         Parcelas</div>

<div>    CONNECTIONTYPE postgis</div><div>    CONNECTION "user=postgres password=postgres dbname=muni_gis"</div><div>    DATA "the_geom from t_parcelas"        </div><div>    STATUS       DEFAULT</div>

<div>    TYPE         POLYGON</div><div><br></div><div>    PROJECTION</div><div>      "init=epsg:4221"</div><div>    END</div><div><br></div><div>  END # States polygon layer ends here</div><div style="font-weight: bold; ">

<br></div></div><div><b></map></b></div><div><br></div><div>The table is populated, everything looks fine, but I can't see any map.</div><div><br></div><div><br></div><div>Then I enter the SQl Query in the SQL Window of pgAdmin III, and start to rewrite this sql query:</div>

<div><br></div><div>select encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex') as geom,"gid" from t_parcelas where the_geom && GeomFromText('POLYGON((5600615.254754 5725111.70807103,5600615.254754 5739818.70784397,5620240.983548 5739818.70784397,5620240.983548 5725111.70807103,5600615.254754 5725111.70807103))',find_srid('','t_parcelas','the_geom'))</div>

<div>With thi error:</div><div><div>ERROR:  geometry requires more points</div><div><br></div><div>********** Error **********</div><div><br></div><div>ERROR: geometry requires more points</div><div>SQL state: XX000</div>

<div><br></div><div><br></div><div>If I extract function AsBinary, there is no error:</div><div><div>Total query runtime: 9625 ms.</div><div>67354 rows retrieved.</div></div><div><br></div><div><br></div><div>Here is my question:</div>

<div>1) How to check if the data is correct ?</div><div>2) do I have lo load data with shp2pgsql command line utility?</div><div>3) any idea ?</div><div><br></div><div>Best Regards.</div><div>Nicolas </div>-- <br><br></div>

<div>_______________<br>.:Nicolás Machado<br>
</div>