I have a problem where my buffer lines do not dissolve with the rest of the data. I want the buffer lines to "open" where they cross other data, right now it looks like the buffer data is layered on top of the other data.
In the picture I have pointed out a place where I would like the buffer to "merge" with the rest. There are plenty of those places, I have tried the dissolve but this is the only result I have gotten. Picture of the problem.
What you want to do is dissolve but you will need to dissolve the polygons based on a field from the attribute table. If all of the shapes that you want to merge have the same value in that field of the attribute table you'll be able to utilize dissolve.
Please see this post from gis.stackexchange:
Merge intersecting polygons into one which are part of the same feature
When I generate filled map by zip code, I get these tiny dots. Besides cranking the opacity to 100% to mask them, is there a way to remove them from and only have a filled map?
It turns out the dots are caused by one of two scenarios:
1. Some zip code are too small and its only plotted as a location instead of a shaded region
2. Some buildings are large enough to have their own zip codes
The only way to remove the dots is to remove (filter) those entries.
I have a similar question to this one: "snapping" polygons together
I have drawn let's say 3 areas. The 1. is overlapping with the 2. and the 2. is overlapping with the 3.
I made sure that I was using the snapping tool and the outer lines are matching each other. That is all fine. But now I want them to be just one feature. So I marked the 3 features and hit "Merge Selected Features". It seemed to work, but there is still the line between them.
Then I gave "Dissolve" a try but it had the same result.
So I played around but did not find any way to handle that. What I more would like to have would be that I can join points. IS there maybe something like merge points? Any ideas are welcome.
Here a picture with the vertical unwanted line: http://imgur.com/mFkNzev
Overally merging features is working. But there is a big issue when one features has issues.
All you need to do is checking the to be merged features. Solve any issue like multiple points or intersections. Now try merging them again and it should work. At least for myself it did.
Another issue could be QGIS. Here it helps a simple restart of QGIS.
So I have 3 lines (technically patches) that have some transparency enabled. These lines were generated by the patchline FEX submission. The FEX entry works great by making patches seem like lines by adding a NaN to the end of the data so it doesn't create a big black patch between the end points of my line.
My lines looks like this
__ __
\ /
_ \ / _
\ \__/ /
\______/
The patch extends from the left end point to the right end point in a straight line across the top and then follows the line on the bottom. The actual patch is hidden (not drawn) though so all the user sees is the lines
The problem is if I wanted to click the bottom hump of the top line, it acts like I clicked the bottom line because it is part of that patch.
I have thought of a couple of workarounds and was hoping you guys could point out flaws or add ideas I might have missed with my workarounds.
Workaround #1
Ideally, I would create an actual line (line series obj.) over the transparent lines. I would turn hittest off on the patches and I would make the actual line invisible, but turn hittest on. The problem I am 99% sure exists is that if visibilty is off, you can't click the object. If anybody has a work around to that issue (documented or otherwise), that would be great.
Workaround #2
Turn the patchline hittest property to off. Make mock line objs. that follow the patchline coords. and have a line width very very small so as to make the line ideally pretty much invisible and have hit test clicks point to these lines instead. Has anybody tried something like this before? (I'm at work and can't try it now)
Workaround #3
NOTE THAT I REALLY DONT WANT TO DO THIS It is of course possible to turn off hittest for the patch/line objs and use the axes buttondown to figure out what patch obj (just the line part) it was closest to.
Once again, any insight would be much appreciated either about my possible work arounds, the situation in general, etc.
Thanks, Shaun
The problem can be illustrated with two line-thick patches, one of which is NOT parallel to the axes:
patch([2 8 8],[5 10 10],'w','EdgeColor','b','EdgeAlpha',0.4,'LineWidth',3)
patch([2 8 8],[4 4 4],'w','EdgeColor','r','EdgeAlpha',0.4,'LineWidth',3)
xlim([0 10])
ylim([3 11])
You cannot select but those lines which are parallel to one of the axes.
Workaround #1: impossible.
Workaround #2: quite visible, why would you need transparent lines then?
Workaround #3: the only way...
Workaround alternative: submit to the TMW a technical request to improve clickability of patches.
Oleg, your initial post somehow inspired me to come up with my elegant solution. (Don't ask me how, just accept my "thank you" haha)
The elegant solution to my problem required me to go beyond patch properties and turn to the axes child order. Under the assumption that none of the lines would intersect each other, I was able to plot them in a order where the bottom one was first, then the second lowest, etc. until I got to the top (effectively rearranging child order).
If anybody else stumbles upon this, what you can do (assuming your lines don't intersect) is to sort the first Y (or whatever values) to go from lowest to highest (in this case) in your plot, and make sure your sort function returns the indicies.
I don't have my computer in front of me, but what you end up doing is effectively making an acontinuous for loop, looping through the indicies.
something like:
for i=[6 2 5 4 1 3]
plot(X(:,i),Y(:,i))
end
Where the 6th column was my lowest data, 2nd column was second lowest on plot, etc.
I have been dealing with a lot of shape files editing tools last month..
I tried to get two dbf files from shape file (one for nodes and one for links) in an appropriate format (node_id,x,y for nodes and link_id,start_node_id,end_node_id,...for links)in order to create an oracle spatial network.
I got the dbf for nodes..
I want now to get the attribute table from a loaded shape file containing polylines (roads) and I want to split each polyline to its segments containing their start and end node id's besides their geometry..
Every help accepted..
You might want to clarify your question slightly, but it sounds like you want to get the details of each point in a polyline from a shapefile so that you can define segments.
I wrote an example of how you can do this using Python here:
https://gis.stackexchange.com/questions/40798/how-to-split-shapefile-per-feature-in-python-using-gdal
Specifically, pay attention to the lines:
line = geom.asPolyline()
# all points in the line
for point in line:
You should be able to achieve your goal using a variation of this basic example.
Dan