開放街圖標誌 OpenStreetMap 開放街圖

Problem: Map a large volume of something that has distinct color.

Solution » High Level: * Highlight a sample square * Send a wanderer around in a perimeter * When the barrier is crossed, stop * Have the end user review

Solution » Low Level [LONG]: public main { //Describe sample square Let the user draw a square //Use sample square int minR, maxR, minB, maxB, minG, maxG; set all the mins to max value and all the max values to 0

for(every pixel in the square)
{
	does it need to be change one of the above 6 ints?
}

//Explore
while(endCondition not triggered)
{
	walk around the perimieter and send it to addSquare()
	if the addSquare says add it, send it to approvedSpots[][]
	else
	{
		ignore it
		but in future versions subdivide the square into 4 areas recursivley to minSizeOfArea;
	}
}

//Encase the area
Find our approved area and go to the top most point from the center.
Drop a point down
Go through the area, if 2 points are on the same line and not necessary, delete it. }

bool addSquare(all 6 rgb values, satteliteArea[][]) { //Filter out the blatantly false average out satteliteAreaRGB if satteliteArea violates the 6 rgb areas, return false.

//Check the square
for all the pixels, how many don't belong
percentDontBelong=numberDontBelong/howmany are in the satteliteArea
    Send it }

Concerns you might have: 1. Automation in OSM? The human has to: Define the sample and approve the result. 2. Junk Data: This would be a problem with a userbase, not a computational problem. We merely create tools. 3. What about non-90 degree angles? I agree that this would be a problem, I would hope someone made a tool that acts like the blender sculpt brush of smooth and bump, but for OSM.

Production: 1. Someone might have made this sort of thing already and I just don’t know about it? If not in JOSM, than in something that costs money. 2. I know that describing a solution is easy and that I did not do the hard part such as the following. How to draw a sample area and convert the pixels into an array, than how to convert the result back.

Edit: My solution (that someone has probably already though of) for non-grid areas is the pin and line model.

Solution » High Level We walk out to the North-most pixel that is compliant with our initial model. We use our string to go around in a circle as far as we can. If alot of errors occur, we place a new pin down where we left off. Repeat the process until we are back to our start.

位置: Shelby County, Iowa, United States
電子郵件圖示 藍天圖示 Facebook 圖示 LinkedIn 圖示 乳齒象圖示 Telegram 圖示 X 圖示

討論

spiregrain2022年07月15日 19時33分 發表的評論

You might also find the balloon Josm plugin useful - available here - https://github.com/ubipo/shrinkwrap.

vorpalblade2022年07月15日 23時29分 發表的評論

You might be interested in the areaselector plugin.

There are a couple of open bugs on it, notably it may cause JOSM to crash when you are closing JOSM. I’ve got a fix for that, but I’m waiting on one of the JOSM maintainers with GitHub write permissions to apply it.

benoitdd2022年07月18日 08時11分 發表的評論

the plugins Scanaerial and Lakewalker might also be helpful, but I didn’t test them

PhysicsArmature2022年07月19日 02時54分 發表的評論

Above solutions

@spiregrain: My idea converts the non-quad world into quads. This is a great add on for converting jagged edges of quads into organic looking worlds. Thank You.

@vorpalblade: This is a great edge detector that does its intended purpose well. Thank You. My purpose is to convert organic images of farmland into nodes. The above add-on targets solid color diagrams of buildings into nodes. I can convert organic images into inorganic diagrams through some sliders and then send it onto the above add on to create something more relevant.

If I where to handle this problem, what would I do now

Addons are hard

My addon making ability would be limited to a single program Java Code that uses previously existing libraries.

Things I would need: getPixelArea(x1,y1,x2,y2) getPixel(x,y) getWorldCordinate(x or y)

createAreaPoint(x,y) called several times closeNewArea() createAreaPoint(x,y) called several times closeNewArea()

moveUserCamera(x,y,screenspace VS worldspace)

setZoomLevel()

Current idea: Bash

I understand bash.

Time delay: sleep 4

Monitor: get: Kind of hard to get exactly 1 pixel.

Mouse get: xdotool getmouselocation –shell eval $(xdotool getmouselocation –shell) echo $X $Y

set: xdotool mousemove 35 243 click 1 &

Keyboard get: read -p ‘Username: ‘ uservar

set: xdotool key space

Current idea: Python

Time: delay

Monitor getPixel(x,y):

Mouse getXY():

setLeftClick():

Keyboard

getText():

setKey(“ “,1):

PhysicsArmature2022年11月 6日 03時48分 發表的評論

Above solutions

@spiregrain: My idea converts the non-quad world into quads. This is a great add on for converting jagged edges of quads into organic looking worlds. Thank You.

@vorpalblade: This is a great edge detector that does its intended purpose well. Thank You. My purpose is to convert organic images of farmland into nodes. The above add-on targets solid color diagrams of buildings into nodes. I can convert organic images into inorganic diagrams through some sliders and then send it onto the above add on to create something more relevant.

If I where to handle this problem, what would I do now

Addons are hard

My addon making ability would be limited to a single program Java Code that uses previously existing libraries.

Things I would need: getPixelArea(x1,y1,x2,y2) getPixel(x,y) getWorldCordinate(x or y)

createAreaPoint(x,y) called several times closeNewArea() createAreaPoint(x,y) called several times closeNewArea()

moveUserCamera(x,y,screenspace VS worldspace)

setZoomLevel()

Current idea: Bash

I understand bash.

Time delay: sleep 4

Monitor: get: Kind of hard to get exactly 1 pixel.

Mouse get: xdotool getmouselocation –shell eval $(xdotool getmouselocation –shell) echo $X $Y

set: xdotool mousemove 35 243 click 1 &

Keyboard get: read -p ‘Username: ‘ uservar

set: xdotool key space

Current idea: Python

Time: delay

Monitor getPixel(x,y):

Mouse getXY():

setLeftClick():

Keyboard

getText():

setKey(“ “,1):

登入 來留下評論