1

I have a shapefile/accompanying projection files etc:

CURRENT.prj
CURRENT.shx
CURRENT.shp
CURRENT.dbf
CURRENT.sbx
CURRENT.sbn

I also have a CSV of geocoded (lat/long) points.

I load up my lat long points using add delimited text layer save them using: use spatial index with X == longitude and y == latitude. I set the CRS as WGS 84. This loads up nicely and in the expected shape.

However, when I load my shapefile I no longer see my points and I only see the contents of my shapefile. My CURRENT.prj file shows:

PROJCS["NAD_1983_StatePlane_New_Jersey_FIPS_2900_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",492125.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-74.5],PARAMETER["Scale_Factor",0.9999],PARAMETER["Latitude_Of_Origin",38.83333333333334],UNIT["Foot_US",0.3048006096012192]]

If I look at the layer properties it's using NAD83 as its CRS.

It's not clear to me if the points are no lining up with my shapefile or are simply scaled to a size that isn't visible. I have tried several different CRS settings to no avail. How do I go about debugging this?

It actually just seems to depends what I load up first. If I load up my lat/long points I see those, if I load up my shapefile I see that instead. I never see the second thing I load. "Zoom to Layer" has no effect either way, I can only zoom to the first thing I loaded.

If I go "set project CRS from layer" I can then switch between "zooming" to my points or shapefile. Looks like they're just mapping to very different places (projecting isn't working)?

My shapefile's coordinates are in the 600k, 600k range, while my point coordinates are all in their lat/long (think -70, 40) so it definitely looks like it's not projecting correctly.

For reference I am new (as in a few hours of messing around) to GIS.

  • 1
    In your Project Properties (Project | Project Properties | CRS), have you checked "Enable 'on the fly' CRS transformation"? – Jake Apr 26 '15 at 6:11
  • Documentation for Jake's question: docs.qgis.org/2.6/en/docs/user_manual/working_with_projections/… Also note the Transformations section at the bottom. Have you tried adding a third layer, such as an online basemap, to reference against? NAD83 is properly a datum but can also serve as a geographic coordinate system. But your prj file specifies the shapefile is using a state plane zone which is a projected coordinate system on the NAD83 datum. There is a distinction, and if the properties show GCS NAD83 then it isn't recognizing the prj file correctly. – Chris W Apr 26 '15 at 6:45
  • @Jake 'on the fly' is enabled – Alex Apr 26 '15 at 16:42
1

After you have added the shapefile, take a look at Rightclick -> SET CRS for Layer.

The layer CRS should be either EPSG:102711, or a custom CRS with these parameters:

+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +datum=NAD83 +units=us-ft +no_defs

You can enable on-the-fly-reprojection, set the project CRS to EPSG:3857, and add a Google or Openstreetmap background with the openlayers plugin. Then you can see which layer is placed well, and which is offset.

If not, it might well be that the .prj file CRS information is wrong, and the shapefile has another projection. It might help to report the extent of the layer, from Rightclick -> Properties, metadata tab.

0

It should be the problem that @Jake mentioned. When adding a CSV layer you are creating a temporary layer which do not alter the default on-the-fly CRS (i.e. WGS-84). When adding the shapefile with a different CRS, you do however alter the on-the-fly CRS to NAD1983, which shift and/or distort your original temporary data.

Two things you may do:

  1. Export your geocoded data to a new shapefile, using the save layer as option from the layer menu.
  2. Consider to project that new layer to the CRS of your shapefile. That can be achieved with te reproject layer tool from qgis toolbox (view menu > panels > toolbox > use the search slot)

Another possibility would be to re-set your on-the-fly CRS to wgs-84. You can do so in many ways. One easy way would be to choose Set project CRS from Layer in your layer menu. Note that the project CRS (i.e. on-the-fly) can be viewed on the bottom right corner of qgis.

  • 1
    GCS NAD83 and WGS84 are likely to differ at most by a few meters, so both datasets should be visible and load in to roughly the same place. However a state plane zone on the NAD83 datum (per the prj file), using a completely different unit (feet instead of degrees) likely would appear in a completely different place, or rather you'd never see them both at the same time because of the tremendous scale difference between units. But yes OTF is the likely culprit here, or a misread prj file. – Chris W Apr 26 '15 at 7:05
  • I think it must be the units? My lat/long from CSV doesn't project correctly on to openstreetmap either, but my shape file does. – Alex Apr 26 '15 at 17:18
  • @Alex. I am not familiar with NAD83, thus wasn't aware about its proximity to WGS84. I did however based my answer to the units issue, since I have it to with DD and meters. I suggest you try to project your data one way or the other. See the answer above. – dof1985 Apr 26 '15 at 18:38

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.