I need to buffer and cut area in sea.
Is it can ? How?
pic1: buffer
pic2:add buffer cut area on sea to InmemoryFeatureLayer
thank you.
I need to buffer and cut area in sea.
Is it can ? How?
pic1: buffer
pic2:add buffer cut area on sea to InmemoryFeatureLayer
thank you.
Sumeth,
You can buffer point, line or polygon based features. You can see some examples in the Code Community. For example, Multi Ring Buffering wiki.thinkgeo.com/wiki/Map_Suite_De..._Buffering
Of course, you can also cut polygons. We call that clipping. For example, you can see that geometric function beeing applied in the sample Clipping wiki.thinkgeo.com/wiki/Map_Suite_De...s#Clipping
So, the answer to your question is yes and we have an API for both buffering and cutting:
.Buffer( ) (Buffering)
184.73.226.83/wiki/ThinkGeo.MapSuit...nceUnit.29
.GetDifferrence (Cutting)
184.73.226.83/wiki/ThinkGeo.MapSuit...Feature.29
You can also see the samples of the How Do I samples under the "Features" cataegory:
-Create a buffer around a feature
-Find the difference of two features
Thank you Val. I will try to do.
Sumeth,
You are welcome. If you have any other questions, let us know.
Hello,
I need result in below picture.
A geometry object which represents the intersection between two input geometry objects.
In sample "Find the difference of two features" , it clipping my buffer out.
I think if I use "EditTools.GetDifferent()", I should have sea layer.(or feature around a feature interested)
And then I will buffer and use "EditTools.GetDifferent()" between A Feature Buffer and feature of sealayer.
It look like difficult because I have Country layer only.
Do you have function make more easy ?
Now I have test with 2 ellipse shape.
it can't cliping.
see this video : mediafire.com/?z5g7cy7a8n2cdhv
And this video for All test : mediafire.com/?0c79airq7za8415
Here is code : mediafire.com/?4646673uqkc27jz
copy and replace to HowDoISample
sorry for my english.
If you misunderstand please tell me.
Thank you.
Sumeth,
To get the overlap as seen in your picture, you need to use the GetIntersection function that can be used with every area based shape (PolygonShape, MultiPolygonShape, RectangleShape and EllipseShape). See the code below. I think this is what you need.
wpfMap1.MapUnit = GeographyUnit.Meter;
RectangleShape rectangleShape = new RectangleShape(8936025, 1466358, 8936719, 1465886);
EllipseShape ellipseShape = new EllipseShape(new PointShape(8936719, 1465886), 300);
//Gets result of overlapping rectangleShape with ellipseShape
MultipolygonShape multiPolygonShape = (MultipolygonShape)rectangleShape.GetIntersection(ellipseShape);
InMemoryFeatureLayer inMemoryFeatureLayer = new InMemoryFeatureLayer();
inMemoryFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(new GeoColor(150, GeoColor.StandardColors.Green));
inMemoryFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(inMemoryFeatureLayer);
wpfMap1.Overlays.Add(layerOverlay);
inMemoryFeatureLayer.Open();
inMemoryFeatureLayer.EditTools.BeginTransaction();
inMemoryFeatureLayer.EditTools.Add(rectangleShape);
inMemoryFeatureLayer.EditTools.Add(ellipseShape);
inMemoryFeatureLayer.EditTools.Add(multiPolygonShape);
inMemoryFeatureLayer.EditTools.CommitTransaction();
inMemoryFeatureLayer.Close();
wpfMap1.CurrentExtent = layerOverlay.GetBoundingBox();
Good Morning Val
thank you very much for code.
I will try your code tomorrow at office.
this is my sleep time.
Sumeth,
I would like to also thank you for taking the time to create the videos. I watched them and I could see what you are trying to do. I think that using the GetIntersection function as explained before is going to solve your problem with clipping. Thank you.
Your code it work fine.
Thank you very much.
Sumeth,
You are welcome. Any other questions, let us know.