Jump to content

 
Photo

Boolean for "select unique" by attribute?

- - - - -

  • Please log in to reply
5 replies to this topic

#1
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,065 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

I have a layer in MAPublisher with several thousand entries of 30 different types, I need to make a list of the individual attribute types to email to my client. Does anybody know a quick and easy way to grab the unique values from the attribute table?

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#2
Andrew Patterson

Andrew Patterson

    Key Contributor

  • Validated Member
  • PipPipPip
  • 99 posts
  • Gender:Male
  • Location:Toronto, ON
  • Canada

I have a layer in MAPublisher with several thousand entries of 30 different types, I need to make a list of the individual attribute types to email to my client. Does anybody know a quick and easy way to grab the unique values from the attribute table?


Open up "Apply Expression" for that layer and then open the Expression Builder. In the bottom half of the dialog, you can find a list of all attributes in a tree widget (left-hand side). Find the attribute in question you'd like to get a unqiue value list for and click on it. In the right-hand pane details about that attribute should appear. There should be a link "Get unique values" (or something like that). Click on that, and let the (probably long if you've got a lot of art) progress finish, and it should append a list of values. You should be able to select & copy the list at that point.

One caveat: you might want to check the MAPublisher preferences for 'Expression Builder' (its the first one, right at the top). By default, I think we limit the list to the first 1,000 unique values we find. If you want more than that (or whatever its set to) you can set that to zero; once you leave that spin box it should pop to 'All'.
Andrew Patterson
Lead Software Architect
Avenza Systems Inc.

email: andrew@avenza.com
phone: 416.487.5116

#3
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,065 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

I have a layer in MAPublisher with several thousand entries of 30 different types, I need to make a list of the individual attribute types to email to my client. Does anybody know a quick and easy way to grab the unique values from the attribute table?


Open up "Apply Expression" for that layer and then open the Expression Builder. In the bottom half of the dialog, you can find a list of all attributes in a tree widget (left-hand side). Find the attribute in question you'd like to get a unqiue value list for and click on it. In the right-hand pane details about that attribute should appear. There should be a link "Get unique values" (or something like that). Click on that, and let the (probably long if you've got a lot of art) progress finish, and it should append a list of values. You should be able to select & copy the list at that point.

One caveat: you might want to check the MAPublisher preferences for 'Expression Builder' (its the first one, right at the top). By default, I think we limit the list to the first 1,000 unique values we find. If you want more than that (or whatever its set to) you can set that to zero; once you leave that spin box it should pop to 'All'.


This is how I normally view the attribute values but I can't copy and paste from this window. I thought there was a boolean expression that returned every unique entry in a column? This might have to be done outside of MAPub though.

At any rate, I took a screen shot and emailed that.

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 


#4
Andrew Patterson

Andrew Patterson

    Key Contributor

  • Validated Member
  • PipPipPip
  • 99 posts
  • Gender:Male
  • Location:Toronto, ON
  • Canada

Well hell, you're right. I had no idea you couldn't copy out of that window. Sorry, I just assumed you could right-click and hit 'Copy', but you're right, there's no apparent way to do that. We're not turning this off in code so this must be some bizarre property of that widget. Try as I might in a GUI editor, I can't seem to make that widget ever allow copying. That's really, really strange. I may have to add a button to copy that out to the clipboard or something, as I don't think there's any other way to get that information elsewhere.

Outside of MAPublisher, maybe export it to CSV and open with Excel? I'm pretty sure Excel has something that figures out unique values. Actually, I just tried it and there's at least one way to do it in Excel. Kind of kludgey, but you can do a filter copy of a column and tell it 'Unique values only'. Seems to work, at least it did on the test data I threw at it.
Andrew Patterson
Lead Software Architect
Avenza Systems Inc.

email: andrew@avenza.com
phone: 416.487.5116

#5
Andrew Patterson

Andrew Patterson

    Key Contributor

  • Validated Member
  • PipPipPip
  • 99 posts
  • Gender:Male
  • Location:Toronto, ON
  • Canada

Okay, this really annoyed me (that it was not letting anyone copy) so I've gone ahead and added a link at the bottom of the link 'Copy unique values to clipboard'. This does exactly what it sounds like; hopefully that's sufficient. If not, let me know. This should be in MAPublisher 8.4 -- sorry about the pain until then.
Andrew Patterson
Lead Software Architect
Avenza Systems Inc.

email: andrew@avenza.com
phone: 416.487.5116

#6
David Medeiros

David Medeiros

    Hall of Fame

  • Validated Member
  • PipPipPipPipPipPipPip
  • 1,065 posts
  • Gender:Male
  • Location:Redwood City CA
  • Interests:Cartography, wood working, wooden boats, fishing, camping, overland travel, exploring.
  • United States

Okay, this really annoyed me (that it was not letting anyone copy) so I've gone ahead and added a link at the bottom of the link 'Copy unique values to clipboard'. This does exactly what it sounds like; hopefully that's sufficient. If not, let me know. This should be in MAPublisher 8.4 -- sorry about the pain until then.


Thanks Andrew. I was puzzled by this as well, I can highlight the values but it won't copy and paste. Not a big deal since this rarely comes up for me but the fix will be good none the less. You guys sure are responsive over there! Thanks again.

GIS Reference and Instruction Specialist, Stanford Geospatial Center.

 

www.mapbliss.com

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->