Select to view content in your preferred language

Loading new layers into SQL with different projection

1345
8
Jump to solution
09-04-2013 08:54 AM
AndrewL
Frequent Contributor
Currently we load weather-related polygons into SQL Server.

1. We download the shapefiles (only 3 files per shapefile: dbf, shp, and shx file). No spatial reference info.
2. Import the shapefile into a file geodb.
3. Add date fields and a couple other fields etc.
4. Load into SQL Server 2008.

The shapefiles have now changed. They are in a custom coordinate system. I am rewriting a python script. Would I need to first clear the projection of the new shapefiles or somehow reproject to no spatial reference?

If I clear the coordinate system of the new shapefiles, they display correctly in ArcMap compared to the previous shapefiles. Thank you!

I am new to SQL Server also.
0 Kudos
1 Solution

Accepted Solutions
ChristopherBlinn1
Deactivated User
Andrew,

That's fine, it's good to ask questions here; that's what the forum is made for :cool:

To simply answer your question, as long as the coordinate system is set correctly in the original weather data shapefiles, then yes it will reproject just fine when imported into the SDE feature dataset.

The warning you are receiving is just informing you that the data frame coordinate system does not match the added shapefile coordinate system.  If you would have not set the coordinate system of the data frame and just added the shapefile to a blank MXD, the warning would not display, and the data frame would automatically set to the shapefiles coordinate system.

For as many posts we've made, I'm surprised we haven't mentioned "On-the-Fly Projection".  The concept is talked about briefly here.  Essentially, on-the-fly simply means the data is visually projected differently compared to it's set coordinate system (the reason you see the warning message).  For most cases, this warning can be ignored and you can simply use the data as expected.  There are some performance issues but in my experiences, nothing too drastic.

Again, it all comes down to the define coordinate system in the original shapefiles.  As long as this is set correctly, then you can do on-the-fly projections, reprojections, etc.

One thing you can do is take the exact same approach (setting the data frame coordinate system and adding the shapefile), then visually inspect the data.  You can also add other data to the map and see if everything appears spatially correct.  If you do this before importing into the SDE, then you will know if the data is using the correct defined coordinate system.

View solution in original post

0 Kudos
8 Replies
ChristopherBlinn1
Deactivated User
Andrew,

When you obtain the weather data, you should Define Projection to match the source data's spatial reference system.

Once the data is uploaded into your SDE, the coordinate system for the weather data will be set to the dataset coordinate system.  However, if the weather data's projection is never defined, you will have issues viewing the data inside of your SDE.

It would be best to define the projection before uploading to SDE, since during the upload it basically reprojects the data to match the feature dataset in the SDE.  If the original projection is not correctly defined, then it does not reproject correctly (the reason your weather data appears wrong once it's in your SDE).

If you need help finding the original coordinate system, try looking into any metadata the source has available where you download the shapefiles.  Also, simply looking at the numerical values can help determine the original projection.  Here's an KB article on how you can go about determining and unknown coordinate system.

Hope this helps!

Best,
Chris B.
0 Kudos
AndrewL
Frequent Contributor
Thank you Chris!

I'll figure out what coordinate system the SQL Server dataset is in and reproject the new shapefiles to that coordinate system.

Do you suggest defining the projection of the data already in the SQL dataset if it currently does not have a coord system?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
The most important thing you can do at spatial data upload is verify that the coordinate reference
metadata on your upload is correct.  Note that you don't need to "reproject" the shapefiles, just to
define the correct coordinate reference at upload.  You only need to reproject If the projection
is inadequate to the task.  Even though most systems still allow it, you should not ever have spatial
data which has a "default" coordinate reference -- this can only cause you grief later.

- V
0 Kudos
AndrewL
Frequent Contributor
Thank you. I think I understand.

So if I have a feature class with coordinate system:

Angular Unit: Degree (0.0174532925199433)
Prime Meridian: Greenwich (0.0)
Datum: NCEP_SPHERE
Spheroid: NCEP_SPHERE


and I want to load this data into an SQL data set with coordinate system below. Since the above feature class has a defined coordinate system it should be ok to upload? Thank you.

Geographic Coordinate System: GCS_WGS_1984
Datum: D_WGS_1984
Prime Meridian: Greenwich
Angular Unit: Degree
0 Kudos
ChristopherBlinn1
Deactivated User
As Vince stated, making sure everything is correct with your coordinate systems is one of the most important steps anyone should take before doing anything else.

If the correct coordinate system has been defined for the original downloaded shapefiles, then yes, importing them into the SDE feature dataset will automatically reproject the data to match the SDE feature dataset coordinate system.
0 Kudos
AndrewL
Frequent Contributor
Ok that sounds good!

Just as a test I opened a new ArcMap document. Then went to Layers > Properties > Coordinate System tab > WGS 1984.

I then added a new weather shapefile layer which contains the NCEP_SPHERE coordinate system.

I get the Geog Coordinate Systems Warning, I click on Transformations, but there are no choices. It just lists <None>.

Does this mean it may not do the reprojection correctly? Will this be similar to what may happen when uploading to SDE? Sorry I just want to make sure and understand correctly. Thanks again.

Andrew
0 Kudos
ChristopherBlinn1
Deactivated User
Andrew,

That's fine, it's good to ask questions here; that's what the forum is made for :cool:

To simply answer your question, as long as the coordinate system is set correctly in the original weather data shapefiles, then yes it will reproject just fine when imported into the SDE feature dataset.

The warning you are receiving is just informing you that the data frame coordinate system does not match the added shapefile coordinate system.  If you would have not set the coordinate system of the data frame and just added the shapefile to a blank MXD, the warning would not display, and the data frame would automatically set to the shapefiles coordinate system.

For as many posts we've made, I'm surprised we haven't mentioned "On-the-Fly Projection".  The concept is talked about briefly here.  Essentially, on-the-fly simply means the data is visually projected differently compared to it's set coordinate system (the reason you see the warning message).  For most cases, this warning can be ignored and you can simply use the data as expected.  There are some performance issues but in my experiences, nothing too drastic.

Again, it all comes down to the define coordinate system in the original shapefiles.  As long as this is set correctly, then you can do on-the-fly projections, reprojections, etc.

One thing you can do is take the exact same approach (setting the data frame coordinate system and adding the shapefile), then visually inspect the data.  You can also add other data to the map and see if everything appears spatially correct.  If you do this before importing into the SDE, then you will know if the data is using the correct defined coordinate system.
0 Kudos
AndrewL
Frequent Contributor
Thank you very much!
0 Kudos