How can I add reference lines at specific degrees/minutes/seconds?

2266
12
Jump to solution
04-01-2021 11:25 PM
KaraG
by
New Contributor II

Hi everyone,

I need to add reference lines at specific latitudes, like the image here: <https://nrm.dfg.ca.gov/FileHandler.ashx?DocumentID=113031&inline>

Here's what I've tried/found so far:

- I found ESRI's base layer lat/long grid, but the resolution is not fine enough (it only goes to 1 degree)
- I found another group of files hosted by USGS (I believe) that had the resolution I need, but not the extent (I need it to cover California but also into the Pacific Ocean)
- I saw something about a "Reference Latitude" tool, but I don't appear to have the proper license to use it
- Lastly, I saw references in a couple of semi-similar questions to the "Create Fishnet" tool, but I honestly can't figure out what parameters to use to get what I need -- if someone could break this down for me, I would so appreciate it. I'm using the California Teale Albers (meters) projection.

This seems like something that would be really simple, but I can't figure it out. Thanks for any ideas/help.

0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

You want specific latitudes or longitude lines, not a regular lat long grid ("graticule") so I don't think fishnet (or graticules and grids - a property of the data frame) are what you are looking for.

Here's a fairly simple approach:

Create an excel sheet with lat long points at (or beyond) the ends of the lines you want to draw (long-lat in decimal degrees) and create points  (Display XY Data). Be sure when you load the data to specify a GCS (the default in ArcMap is the data frame coordinate system).  Then create a line feature class and use the ArcMap editor to draw the lines, snapping to your points.

Or, you could create a line feature class in GCS, and use the ArcMap editor to type in the XY coordinate vertices (with a data frame set to GCS so you could see what you were doing).

Any other olds remember doing this by writing AMLs using the GENERATE command?

View solution in original post

12 Replies
DavidPike
MVP Frequent Contributor

I cant seem to access that URL so not sure exactly what you mean, but I guess it's just a grid of Lat Long to minute etc. precision.

 

If so, Create fishnet would definitely be what you need.

Create Fishnet (Data Management)—ArcGIS Pro | Documentation

How Create Fishnet works—ArcGIS Pro | Documentation

You would just set your coordinate system to Geographic Coordinate system WGS84 when using to tool, rather than your current Projected coordinate system Teale Albers.

For example, the input for x origin coord at 0 deg Lat and 0 Long would be ('0, 0'), to be oriented North, y coord would be ('0, 1') and the cell width/height would be decimal degrees i.e. 1 minute would be (1/60).  Then specify the number or rows etc.  

curtvprice
MVP Esteemed Contributor

You want specific latitudes or longitude lines, not a regular lat long grid ("graticule") so I don't think fishnet (or graticules and grids - a property of the data frame) are what you are looking for.

Here's a fairly simple approach:

Create an excel sheet with lat long points at (or beyond) the ends of the lines you want to draw (long-lat in decimal degrees) and create points  (Display XY Data). Be sure when you load the data to specify a GCS (the default in ArcMap is the data frame coordinate system).  Then create a line feature class and use the ArcMap editor to draw the lines, snapping to your points.

Or, you could create a line feature class in GCS, and use the ArcMap editor to type in the XY coordinate vertices (with a data frame set to GCS so you could see what you were doing).

Any other olds remember doing this by writing AMLs using the GENERATE command?

DavidPike
MVP Frequent Contributor

Could you access the URL? So is that what's meant by specific i.e. a non regular grid?

If that's the case then you could just delete the lines from a polyline fishnet or conversely select the lines you need and either export or switch selection and delete.

0 Kudos
curtvprice
MVP Esteemed Contributor

Yes the URL works for me. here's a picture of it for the good of the thread. 

latlong_picture.png

KaraG
by
New Contributor II

Thank you both so much for your help. I used the Create Fishnet tool in a new data frame with the WGS 1984 GCS and was able to get a grid of the area I need. I was nervous that using the decimal 0.016667 for 1/60 would introduce a tiny offset or something but it didn't -- it lined up perfectly with another grid in a slightly different area than what I needed.

So now that I have this shapefile, would I use the Define Projection tool or the Project tool to put it in the California Teale Albers projection that my other shapefiles are in? If I leave it in WGS 1984, it might not match up, right? Sorry if this is a lame question, I've been using ArcGIS for a while but I still don't have my head wrapped around the coordinate systems.

I have another single line that I need to add outside the grid I already made, so I might try the second method (the xy coordinates and snap a line) for that one since it is just a one-off.

Thanks again!

0 Kudos
DavidPike
MVP Frequent Contributor

Nice!  I might just use the fishnet tool again, but specify something like 1 row, but it's up to you.

Please use the Project tool rather than the define projection tool (there's a huge difference between properly transforming coordinates to another system with the Project to - as opposed to saying decimal degrees are now x y cartesian coordinates in a plane (coord being xy metres from a specified origin) in a new projected coordinate system - which is what would happen with incorrectly using Define Projection)

curtvprice
MVP Esteemed Contributor
It lined up great because .00001 decimal degrees is like 1 m. (1 degree = 112 km at the equator). That's a lot of net to fish, but glad it worked for you.
Your lines should be fine in WGS84 - ArcMap projects everything on the fly *as long as* coord systems are properly defined. Sometimes you may have an issue where you need to densify the lines if straight lat long lines become curved in the target projection.
KaraG
by
New Contributor II

Uh oh my problem does not appear to be completely solved just yet, hoping you don't mind giving a little more help.

I added the grid that I had made to the data frame with all of my other shapefiles that I've been working with. I got a message saying that the grid had no spatial reference and could not be projected. I used the Project tool to change it from WGS 1984 to California 1983 Teale Albers. The tool executed successfully but the lines no longer look the way they should. In the image below, the polygon shapefile is from USGS and shows 15 minute blocks. The blue lines are latitudes that I selected from the grid that I made. The blue lines no longer match up with the USGS grid. Any idea where I went wrong?

KaraG_0-1617390478055.png

 

0 Kudos
curtvprice
MVP Esteemed Contributor

What did you give as the input coord system for project, since the input didn't have one?????

Define Projection is used when the feature class has no spatial reference (or it's wrong). Sounds like you didn't provide a spatial reference to the fishnet tool, so you need to run Define Projection on it so Arc knows what the xy coordinates mean (lat lon WGS84). THEN you can project the grid (though I don't think you need to, ArcMap projects these things on the fly AS LONG as the spatial reference is defined.

Great book to push on you: Lining Up Data by Maher (Esri Press). It's *fantastic* for a better understanding of coord systems and what to do when things don't draw in the right place.

I still think fishnet is a very complicated way to go at this. 🙂