-1

I am trying to edit shapefile in ArcMap.

How I can keep or clean some information from shapefile in ArcMap?

In my shapefile, I have information about street type such as road, route, highway, street, expressway,... I just want to use road and highway and I want to remove other street type information. This is the file: https://www12.statcan.gc.ca/census-recensement/2011/geo/RNF-FRR/index-eng.cfm

I used DBF file extension to work with Excel, then I import Excel file in Stata to clean my data. (I used this command: keep if type == "RD" | type =="HWY" ). After cleaning process, I import CSV Excel file into ArcMap, then I tried to convert CSV file to shapefile. But, I could not create network dataset.

  • 3
    You need to tell us more about what you mean by "edit". Are you trying to remove some features from the shapefile? Are you trying to change the geometry of existing features? – Llaves Nov 28 '18 at 3:59
  • 1
    Have a read of resources.arcgis.com/en/help/main/10.2/index.html#/… and resources.arcgis.com/en/help/main/10.2/index.html#//… and some of the related documents, this sounds like what you're after. – Michael Stimson Nov 28 '18 at 4:04
  • 3
    Don't save from Excel it will break the dbf file. If you want to remove everything except Type = 'RD' or Type = 'HWY' in ArcMap then use select by attributes on the layer with the query not (Type = 'RD' or Type = 'HWY' ) and then either press delete in an edit session or execute the Delete Features tool resources.arcgis.com/en/help/main/10.2/index.html#//… which will remove the selected features... be sure to keep a backup though. Creating a network dataset should be a 2nd question, please address that in a new thread; do you have a Network Analyst license? – Michael Stimson Nov 28 '18 at 4:45
  • Thank you so much!! Actually, what I am trying to do is that I have CSD coordinates and Border coordinates for Canada, I want to see which roads can be used to go from origin to destination points. (For instance: from Toronto to Vancouver, which roads can be used to arrive in Vancouver with / without crossing border) I want to see this network in ArcMap. Thus, I am trying to combine those 3 file, do you think that can I combine CSD cordinates and Border coordinates with Road network file to have what I am trying to do obtain ? @MichaelStimson – Aera Nov 28 '18 at 16:21
  • Yes, I have license. @MichaelStimson – Aera Nov 28 '18 at 19:40
3

You can edit the file directly in ArcMap. Load the shapefile into ArcMap, then right click on the new layer and select "Open Attribute Table". In the attribute table click on the button in the top left (Options) and click "Select by Attributes". This will open a new dialog where you can write a selection query. Yours will be something like

  "type" = 'RD' OR "type" = 'HWY' 

Watch out for double vs. single quotes. Double are used for field names, single for values. You can select the field names from the dialog box which will provide the right quoting. Likewise, you can click "Get Unique Values" to see the possible values. Click on a value and it will be entered in the query with the right quotes. Once your query is written, click on "Apply". The relevant entries will be highlighted in the attribute table.

Dismiss the 'Select by Attributes" dialog and return to the map view. Right click on the layer and select "Export". Select "Export Selected Features", pick the coordinate system you want (original layer vs. dataframe), and set the output location and type (probably want to save back as new shapefile). Click OK and you're done.

  • 1
    You don't need the double quotes or square brackets for a selection where clause. type = 'RD' OR type = 'HWY' will work for shapefiles, file geodatabase, personal geodatabase... the delimiting of field names for selection SQL statements adds unneeded complexity. – Michael Stimson Nov 29 '18 at 2:13
  • 1
    @MichaelStimson - thanks for pointing this out. I'm so used to just clicking the field names and having ArcMap add it with double quotes that I had forgotten that the quotes are option. – Llaves Nov 29 '18 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.