Welcome to Golden Software Support

Calculation of centroids, area and perimeter

Comments

3 comments

  • Official comment
    Avatar
    Brittany Bodane

    Hi Alberto,

    Thank you for your forum post.  In MapViewer, it is possible to calculate the centroids using Object Reports.  You can run a centroid report, save the results as a text file, then Import the file into your DBF file opened in Mapviewer's worksheet.  While it is possible to add this information to your DBF, it is currently not possible for you to save in DBF format, or export to DBF.  I have added a vote on your behalf to our suggestion file to add support of saving/exporting to DBF in future versions of MapViewer.  I have also added a vote on your behalf to add the option to append the results of the report to a worksheet file. 

    With that being said, you can follow the steps below to add the information to the DBF, export the file to an ESRI supported text format, open in ESRI and export as DBF once more. 

    To run a centroid report and add this information to the DBF, please see the steps below:

    1. With your shapefile open, click Analysis | Make Report | Object Reports | Centroid.
    2. In the Report Centroids dialog, leave Report coordinates in BNA form and Quote IDs both unchecked.
    3. Change the Coordinate units if you prefer and click OK. 
    4. The Boundary Centroid Report will now show the coordinates of the centroids.  In this report, click File | Save As.
    5. In the Save As dialog, give the file a name and change the Save as type to Text Format (TXT) (*txt). Click Save. 
    6. Click File | Open select your DBF file and click Open.
    7. Click in the first open cell of the first open column to select it.
    8. Click Data | Edit | Import select the new txt file and click Open. 
    9. Delete the extra header rows by clicking and dragging to select them, right click over the highlighted portion and click Delete.  
    10. In the Delete dialog, toggle Shift Cells Up and click OK. 

     

    It is also possible to do this using MapViewer's automation to make it a less manual task, as it sounds like it is in ArcGIS.  You can find the resources to create a script using Map Viewer's Help.  If you would like assistance debugging a script, feel free to email support@goldensoftware.com for help.

    Thank you,

    Brittany Bodane

    Golden Software 

    Comment actions Permalink
  • Avatar
    Alberto Vargas

    Hi Brittany,
    I know the option to calculate the centroids with Analysis / Data / Make report but it is quite tedious to export, paste, delete, etc.


    The biggest problem is that Mapviewer does not export or update the data to the DBF file. ArcGIS does it directly in the DBF table.


    Ideally, the columns should be updated directly in the worksheet.
    It would also be interesting if you could also add the calculation of the area and the perimeter in the worksheet.

    Best regards,
    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Brittany Bodane

    Hi Alberto,

    Thank you for more information.  Your vote stating any report should have the option to append the results to the worksheet or file has been added to our suggestion file. 

    I also added a vote on your behalf to our suggestion file to add an option similar to ArcGIS that would append geometry attributes to the attribute table, or file, with the click of a button. 

    Please let us know if you have any further questions, or feature requests.  Your feedback is very important to us.

    Thank you,

    Brittany Bodane

    Golden Software

    0
    Comment actions Permalink

Please sign in to leave a comment.