[Routing] how to delete a line temporary

javad sadidi jsadidi at gmail.com
Mon Aug 1 10:34:49 BST 2011


hi thanks for your answer, I explain it more and then please help me in more
details because I am new.
I have a openstreet map as a background in my website and I have imported my
OSM data to postgresql and right know I can find the best route in my city.
I connect to my pgsql database by PHP and doing the task.
then, I want to click on a specific line send the request by PHP to pgsql
database and delete the line temporary , I mean when I delete the line , it
should not be considered in find the best route when all usual users use it.
then when I decide to back the line , I have to able to back it and enter it
to find the best route for all users again. it may do for some lines.
 I inform you, I use openstreet map data and Geoext with openlayers and
suing PHP for server connecting and querin.
thanks


On Sun, Jul 31, 2011 at 9:06 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:

> On 7/31/2011 2:04 PM, javad sadidi wrote:
>
>> hi to all
>> who does know , how can I select a route in browser then send a request
>> to postgrsql database to delete in temporary but not for always . and
>> then to back the deleted line to the database whenever I want .
>> I know that I have to put a point then select the nearest edge . and I
>> dont know what should I do then.
>> thanks
>>
>
> There are a bunch of different ways to do this but they depend on what you
> want to achieve.
>
> For example if one use deletes a line do you want the line deleted for all
> users?
>
> If it is only for a single user during there active session, then you can
> get the gid for each segment that the user wants to delete into an array.
> Then you can change you query to selecting segments and add to the where
> clause 'and gid not in (<list of gid from array>)'
>
> You could also add another layer in openlayers to display the deleted
> features in say red so the use can see them.
>
> If you want this to be global then create a table and add the gid for the
> deleted segments to that table and modify your query to join to this table
> and eliminate those segments ro do something like:
>
> 'and gid not in (select gid from deleted)'
>
> Then when you want to add the segments back in, remove them from the array
> or table.
>
> -Steve
>
> ______________________________**_________________
> Routing mailing list
> Routing at openstreetmap.org
> http://lists.openstreetmap.**org/listinfo/routing<http://lists.openstreetmap.org/listinfo/routing>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/routing/attachments/20110801/bdb7a87b/attachment.html>


More information about the Routing mailing list