Posts

Showing posts from July, 2019

GIS Stack Exchange

GIS Stack Exchange  is a website where you can post questions about GIS to fellow GIS professionals, and get answers.  It was a great way to help each other out, and pass on the little nuggets of wisdom that you have gained throughout your career.  They can be questions about any topic or any software.  You can tag your questions with their related topics, and be notified if anyone answers, or asks clarifying questions.  Your thread can turn into a discussion with lots of ideas. So, if you are looking for a way to pass on everything you have learned along the way, this a great place to do so, while also helping people out. Happy GIS-ing! Lindsy Hales Bentley

How to Calculate RGB Percent Using Python

I was working on a project recently, where marketing needed varying shades of the same color for an online map.  So, my boss and I wrote a python script that will give the RGB numbers for your input. Using PyScriptor, this was my code: def main():     pass if __name__ == '__main__':     main() import numpy as np import arcpy #This script will calculate a percentage of a RGB color. red = arcpy.GetParameterAsText(0) green = arcpy.GetParameterAsText(1) blue = arcpy.GetParameterAsText(2) percent = arcpy.GetParameterAsText(3) rgb = [int(red),int(green),int(blue)] pct = float(percent) def lighter(color, percent):     '''assumes color is rgb between (0, 0, 0) and (255, 255, 255)'''     color = np.array(color)     white = np.array([255, 255, 255])     vector = white-color     return color + vector * percent arcpy.AddMessage(lighter(rgb, pct)) Load this script into your ArcToolbox in A...

Converting Microstation DTM into a GIS Surface

Here is how to convert a Microstation DTM into a GIS surface. Open a new blank .dgn.  Make sure to use the default 3d seed file from ESRI.  Set the coordinate system (If a dialog box pops up asking if you want to change units, do so). In the dgn, select the window tab and show the InRoads Explorer window. In the Inroads Explorer window Select File, Open, select the .dtm, and select open.  The open window will stay open, you need to hit close after the dtm has been loaded. Highlight the imported .dtm and select the Surface tab.  Inside the surface tab, select view surface tab, and then select surface elevations. In the surface elevation window, deselect elevation, and double click points.  Make sure points come across with a text font. Save settings and then save the dgn. Run the “CAD to Geodatabase” tool in ArcMap or Pro.  Select the dgn that you saved.  Assign the coordinate system in the tool. Run. The feature class created is an annotati...