[Geomoose-users] Re: Feature Editor Adding Point, Line, Polygon Problems

sana butt sanaatifbutt85 at gmail.com
Sun Jan 29 23:38:26 EST 2012


Thanks Brent

Actually the problem was in my layer.ini and .map file.

Could you please guide me in making delete service too.

What I did sofar:

Step 1)


<service name="modify_point">
        <url>php/editor.php</url>
        <step type='spatial' name='feature:wkb_geometry' line='false'
polygon='false' point='true' default='point' edit-point='true'>
                <input type="hidden" name="op" value="update"/>
                <input type="hidden" name="table" value="test_points"/>
                <input type="hidden" name="feature:feature_id"/>
                <input type="user" name="feature:attribute1"
title="attribute1:"/>
                <input type="user" name="feature:attribute2"
title="attribute2:"/>
        </step>
</service>


<service name="delete_point">
        <url>php/editor.php</url>
        <step type='input'>
                <input type="hidden" name="op" value="delete"/>
                <input type="hidden" name="table" value="test_points"/>
                <input type="hidden" name="feature:feature_id"/>
        </step>
</service>

Step 2)

    <tool name="delete_point" title="Delete Point" type="service"
service="delete_point"/> (gives me message of "No Feature ID specified to
delete.")

Step 3) identify.html

<tr bgcolor="#AA55AA">
    <td>Feature:</td><td>[feature_id]</td>
</tr>
<tr>
    <td>Attribute1:</td><td>[attribute1]</td>
</tr>
<tr>
<td>
     <a href="javascript:GeoMOOSE.startService('modify_point',
{'feature:id' : '[feature_id]','feature:wkb_geometry' : '[wkt_geometry]',
'feature:attribute1' : '[attribute1]', 'feature:attribute2' :
'[attribute2]'})">Edit</a>
</td>
<td>
     <a href="javascript:if(confirm('Are you sure you want to delete
this?')) { GeoMOOSE.startService('delete_point', {'feature:id' :
'[feature_id]'}); }">Delete</a>
</td>
</tr>

Now what step I need to perform, e.g.,  my identify.html is not recognizing
(i guess so) to start the service of modify_point or delete_point etc.

Kindly check the URL and files path from here:

http://216.58.43.167/**geomoose2/ <http://216.58.43.167/geomoose2/>

http://216.58.43.167/**geomoose2/geomoose.html<http://216.58.43.167/geomoose2/geomoose.html>

Regards
Sana




On Sun, Jan 29, 2012 at 2:37 PM, Brent Fraser <bfraser at geoanalytic.com>wrote:

> Since the error message says it can't find a column named "id" (and your
> table uses "feature_id" as the key column), I expect the problem is a
> configuration problem in your mapbook.xml file.  Check your column names in
> your service definitions (modify, delete, and especially add) in your
> mapbook.xml and confirm it has
>
> <input type="hidden" name="feature:feature_id"/>
>
> Best Regards,
> Brent Fraser
>
>
>
> On 1/29/2012 3:11 AM, sana butt wrote:
>
>> Hi Brent
>> I have added polygon feature and its working, Now I have added point
>> using the same criteria available at feature editor guide, but its not
>> working.
>> Could you please test the URL:
>> http://216.58.43.167/**geomoose2/geomoose.html<http://216.58.43.167/geomoose2/geomoose.html>
>> and add point.
>> What I have done so far:
>> CREATE TABLE test_points
>> (
>>  feature_id integer NOT NULL,
>>  attribute1 character varying(100),
>>  attribute2 character varying(100),
>>  wkb_geometry geometry,
>>  CONSTRAINT pk_test_points PRIMARY KEY (feature_id)
>> )
>> CREATE SEQUENCE test_points_seq;
>> insert into geometry_columns values ('', 'public', 'test_points',
>> 'wkb_geometry', 2, 24, 'GEOMETRY');
>> and follow the instructions available in feature editor guide.
>> I got this error in firefox.
>> URL:
>> http://216.58.43.167/cgi-bin/**mapserv.exe?map=%2Fms4w%**
>> 2Fapps%2Fgeomoose2%2Fmaps%2F%**2Fdevelopment%2Ftest_points%**
>> 2Ftest_points.map&layers=**points&mode=map&mapext=457196.**
>> 607656+4917749.476731+517604.**607656+4948205.476731&imgext=**
>> 457196.607656+4917749.476731+**517604.607656+4948205.476731&**
>> map_size=2517+1269&imgx=1258.**5&imgy=634.5&imgxy=2517+1269<http://216.58.43.167/cgi-bin/mapserv.exe?map=%2Fms4w%2Fapps%2Fgeomoose2%2Fmaps%2F%2Fdevelopment%2Ftest_points%2Ftest_points.map&layers=points&mode=map&mapext=457196.607656+4917749.476731+517604.607656+4948205.476731&imgext=457196.607656+4917749.476731+517604.607656+4948205.476731&map_size=2517+1269&imgx=1258.5&imgy=634.5&imgxy=2517+1269><
>> http://216.58.43.167/cgi-bin/**mapserv.exe?map=%2Fms4w%**
>> 2Fapps%2Fgeomoose2%2Fmaps%2F%**2Fdevelopment%2Ftest_points%**
>> 2Ftest_points.map&layers=**points&mode=map&mapext=457196.**
>> 607656+4917749.476731+517604.**607656+4948205.476731&imgext=**
>> 457196.607656+4917749.476731+**517604.607656+4948205.476731&**
>> map_size=2517+1269&imgx=1258.**5&imgy=634.5&imgxy=2517+1269<http://216.58.43.167/cgi-bin/mapserv.exe?map=%2Fms4w%2Fapps%2Fgeomoose2%2Fmaps%2F%2Fdevelopment%2Ftest_points%2Ftest_points.map&layers=points&mode=map&mapext=457196.607656+4917749.476731+517604.607656+4948205.476731&imgext=457196.607656+4917749.476731+517604.607656+4948205.476731&map_size=2517+1269&imgx=1258.5&imgy=634.5&imgxy=2517+1269>
>> >
>>
>> Error:
>> msDrawMap(): Image handling error. Failed to draw layer named 'points'.
>> prepare_database(): Query error. Error declaring cursor: ERROR: column "id"
>> does not exist LINE 1: ...b_geometry)),'NDR'),**feature_id::text from
>> (select id as feat... ^ With query string: DECLARE mycursor BINARY CURSOR
>> FOR SELECT asbinary(force_collection(**force_2d(wkb_geometry)),'NDR')**,feature_id::text
>> from (select id as feature_id, attribute1, attribute2, astext(wkb_geometry)
>> as wkt_geometry, wkb_geometry from test_points) as mytable WHERE
>> wkb_geometry && setSRID('BOX3D(457184.**796930448 4917749.476731,517616.*
>> *418381552 4948205.476731)'::BOX3D, 24 )
>> I dont know, where I made mistake in creating table, etc.
>> Could you please help me solving this issue
>> Regards
>> Sana
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20120129/8c99d99b/attachment.html


More information about the Geomoose-users mailing list