Hello.
Apologies if this was solved before, but I couldn't find any solution.
My problem is following.
I have sqlite file which contains geometry for roads, as line features.Line features are basically road axis.
Another sqlite file has traffic signs as point objects that are placed exactly on road axis.
Looks like this:
Considering the fact that most roads signs are usually 3 meters left of right from roads axis, I need to offset point objects 3 meters left of right, in relation to road axis.
Any ideas how to do this in MAP 3D or some other Autodesk product.
Cheers,
Ivan
Solved! Go to Solution.
Solved by swt-gis. Go to Solution.
Hi,
>> Another sqlite file has traffic signs as point objects
There might be signs only on the right side (assuming now right-side traffic), the traffic-signs might be placed on both sides, some are rotated (like one-way signs) and much more info needed to be able to give you an answer.
Just having 2 independent datasets (one line, one point with just a symbol) and without a relation between them I would say "close to impossible".
BTW: who has created a traffic-sign dataset without the correct position of the traffic-sign? I would start here, because there is the first missing link to position your traffic-signs correctly.
- alfred -
Hi Alfred and thank you for replying.
Another company provided us with traffic signs data and since we no longer have contract with them, it's impossible to get anything done with them.
Position of the sign can be left, right and above the road. Since there is corresponding attribute, I can easily filter signs based on that attribute. I was thinking about filtering only lefts ones and then moving them 3 meters to left. But considering the road geometry, that wouldn't get my anywhere.
Anyway thank you very much for your input,
Cheers
long shot guess 🙂
how many do you have to move? if fifty or fewer manually may be fairly quick.
Lots and lots of signs do some math.
above the road there may be no change or a 1.5 meter shift for example to put the sign centered over one lane
if all the road directions are up or left (N or W) the angle of a left offset is road angle +90d and a right offset angle is road angle -90D for offsets at 90d to the road
the new sign position is on that line a radius of a circle X meters away from the current sign position at the road centerline. X = road width + 3 Meters, i.e or an offset from the centerline which depends on the number of lanes, etc.
so trigonometry formulae should be able to calculate the new x,y
First, make copies of the original files and work with copies.
intersection of the roads and signs files should put all the data into one file. and then logically query out to new files by sign position situation, i.e. centered, one lane left, two lanes right, left shoulder, etc., then apply the calculations. Map3D will work with radians and has built in trig functions so this will take a bit of planning and thinking through, but should work if you are patient.
after all that is done, build a new file with the signs in the new positions with only the needed attributes.
My best guess at this one.
dave
Thank you Dave, I will give it a shot. Had something similar planned.
Unfortunately I have over 30 000 signs so, doing them one by one, is not an option.
Will let you know how it goes.
Cheers
The first answer in this links shows some mathematical terms to calculate the offset.
The second answer uses SQL to offset the points. It uses PostGIS but I guess it will be quite similar using SQLite.