Q&A - Question

Edit a shape

Question
FabD asked on February 10, 2017, keyword: Developer Kernel
Hello.
I wonder if is possible to programmatically move a point of a shape (vector layer), or remove a point.
 
In the TGIS_Shape documentation I've found only the methods to add a part (AddPart) and to add a point (AddPoint). But what about move a point, delete a point or delete a part?

Thank you
Answers
Tomasz Kosinski (TatukGIS) replied January 11, 2017
Hi,

We do not provide such interface bascuse shape must be reconstructed anyway (holes/island relationship, extent recalculation)
You can use TGIS_ViewerWEnd.Editor (TGIS_Editor) to perform shape part editing however internally it will recreate shape anyway..
 
Danv replied February 10, 2017
Hi,

Get your shape in the TGIS_ViewwerWnd.Editor.EditShape...
And then this:

There is the TGIS_ViewerWnd.Editor.MovePoint. Choose which point and give the new coordinate.

To delete a point use TGIS_ViewerWnd.Editor.DeletePoint
If you would like to answer the question please Sign In.
*
*
Please review our recent Privacy Policy.
If you have any questions or requests, please contact us.
Rules
The Questions and Answers (Q & A) is intended to provide a means of communication between TatukGIS customers.
 
  1. Licensed users (with active maintenance play) of TatukGIS products may contribute to the Q & A content. Read-only access is available to anyone.
  2. Keep the content positive and professional.
  3. Be courteous to others by posting information when a question or issue asked on the Q & A is answered or resolved by other means (such as with help from TatukGIS technical support). Offer others at least a hint how the posted question was answered or the issue was resolved.
  4. The Q & A is not a replacement for TatukGIS technical support. TatukGIS team may or may not regularly follow or contribute content.