Subscribe to this thread
Home - General / All posts - Drawing does not appear in Map
yves61
169 post(s)
#10-Sep-20 10:04

I am just shifting from Manifold 8 to Manifold9 9.0.172.5. running in 64-bit mode

With Manifold 9 :

I created a new data source (Bing Satellite)

I imported a shp file (Refprv).

I created a map and drag and drop the BingSatellite Image on the Map

I drag and drop the Refprv drawing onto the Map. The Refprv tab appears on the bottom row of the Map.

The Refprv drawing however does not show. Trying to go to the extent of the Refprv drawing by CTRL+clicking the Refprv tab but no go. The Refprv drawing has a projection and the necessary indexes AFAIK.

So the Refprv drawing does not automaticaly re-project "on the fly" to my understanding.

Attached my test2.map.

Could anyone have a look at it and tell me if I miss something obvious and what it could be, or what is going wrong.

Attachments:
test2.map

Dimitri


6,206 post(s)
#10-Sep-20 10:17

So the Refprv drawing does not automaticaly re-project "on the fly" to my understanding.

Sure it does. But that cannot work if the projection assigned to the drawing is incorrect. Opening the two drawings indicates something wildly wrong in their assigned projection.

Best to provide a link to the original shapefiles. Sounds like there is something wrong in the .prj, etc.

yves61
169 post(s)
#10-Sep-20 10:54

Sending the bunch of files attached in two times.

Attachments:
Refprv.dbf
Refprv.lyr
Refprv.prj
Refprv.sbn

yves61
169 post(s)
#10-Sep-20 10:55

So these are the original files.

Thanks for looking into it.

Attachments:
Refprv.sbx
Refprv.shp
Refprv.shx
Refprv.WOR

Dimitri


6,206 post(s)
#10-Sep-20 12:45

All you need for a shapefile is the .dbf, .prj, .shp, and .shx. Importing the shapefile it also looks off, just like in the sample map you sent.

I guessed that the projection might be off, so I used the Info pane to Repair Initial Coordinate System.

In the Standard tab, there are only two projections specifically for Belgium: Belgium Hooijberg and Belgium National Geographic Institute.

I picked Belgium Hooijberg and using that put the Refprv drawing into the right location, as seen in a map with a Bing streets background layer.

Actually, it's close but not exact, which can be seen by using transparent fill color for the areas, so you can see how borders of the areas line up with what are likely defining border lines in Bing. That projection uses a Center latitude of 50.79936222222222 and a Center longitude of 4.367486666666666

Next, I tried Repair using Belgium National Geographic Institute projection. That is way off, exactly as in your original drawing. Looking at the definition of that projection, it uses a Center longitude of 4.367486666666666 but a center latitude of 90, which seems wrong.

Looking into this in greater detail, it appears that the Belge 1972 (EPSG: 31370) coordinate system, as EPSG says, was " Introduced in 2000 as an alternative to CRS code 31300 to avoid the special projection method LCC (2SP Belgium) (code 9803). If software cannot handle latitude of origin 90°N, use latitude of origin = 50°47'57.704"N with Nf = 165372.956 m."

So, translating the degrees/minutes/second origin number into decimal degrees, we get: 50.79936. If we use Repair Initial Coordinate System to assign EPSG 31370, and then we go into the Custom tab and change Center latitude to 50.79936 and False northing to 165372.956, the drawing lines up perfectly.

It turns out there are some rare cases where special projection routines are used for LCC, and those allowed a center latitude of the North pole. Neither 8 nor 9 does those, but I think it should given that Manifold supports EPSG codes that allow a 90 degree center for Lambert Conformal Conic. I've sent in a suggestion to add this.

In the meantime, you can use this projection if you use Repair Initial Coordinate System - More - Custom Tab, and in that Custom tab use 50.79936 for the Center latitude and 165372.956 for the False northing. You can save that as a Favorite (I called my version Belge_Lambert_1972 Alternate) so you can apply it using Repair Initial Coordinate System with one click to any other drawings that use the Belg_Lambert_1972 projection, like the Bedrterr40000 drawing.

What I used for a new Favorite:

Attachments:
alternate_projection.png
right_projection.png

yves61
169 post(s)
#10-Sep-20 11:12

Dimitri what do you mean by :

Opening the two drawings indicates something wildly wrong in their assigned projection.

yves61
169 post(s)
#10-Sep-20 11:19

For another test you may try with these files too. (Bedrterr23060.zip attached)

Attachments:
Bedrterr23060.zip

Dimitri


6,206 post(s)
#10-Sep-20 12:03

In the test2.map that you first sent, open the Refprv drawing. You can see the tracker doesn't work and there are no coordinates reported in the status bar when you move the mouse cursor over the drawing. That's a clear indication something is so catastrophically wrong with the projection that even wrong coordinates cannot be reported.

Next, open the Coordinate System dialog for that drawing. What it reports is a Lambert Conformal Conic projection with a wrong value, namely, that the center latitude is 90 degrees, that is, located at the North Pole. When using Lambert Conformal Conic, the center latitude should be somewhere between the first and second standard latitude, or at least not too far off.

Attachments:
wrong_projection.png

yves61
169 post(s)
#10-Sep-20 13:21

Dimitri

The Manifold 9 built-in projections --> EPSG 31370 as well as "Belgium National Geographic Institute" both mention Center latitude 90 degrees.

I have checked Manifold 8 projections and there also "Belgium National Geographic Institute" mentions Center latitude 90 degrees.

I will try your suggestions as above. ALternate and Favourite.

yves61
169 post(s)
#10-Sep-20 13:36

I am a dummy concerning projection methods but just to make sure:

I have been digging a little further in the projections and found this -->

Is the transform right down in the image right ? If not, could that cause the problem with the "on the fly" projection ?

Dimitri


6,206 post(s)
#10-Sep-20 19:32

No, the base coordinate system is not it, and the problem is not on the fly projection. It's just getting the right settings for the projection to be used on import. Use the settings that I gave in that screenshot right after I wrote "what I used for a new Favorite" and it works perfectly.

The problem fundamentally is that both EPSG 31370 as well as "Belgium National Geographic Institute" as written require a special case form of LCC, that Manifold does not support (QGIS doesn't either, but Arc does). Change the parameters as EPSG advises (as quoted in my earlier post), and then the usual form of LCC, which Manifold does support, works fine. That's where the numbers came from that I used in that screenshot.

On the one hand, I can see why those two coordinate systems are listed as is, because that's how they are defined, but if you have to adjust them manually to use them, I don't think that's acceptable.

Manifold should either adjust those projections as listed in Manifold to use the parameters that EPSG recommends for non-special case LCC, and not rely on people knowing to do that manually, or Manifold should in addition to the usual LCC projection implement the special case LCC routines that would automatically swing into action anytime somebody quotes a Center latitude of 90 for LCC. The former is a quick hack but the latter is the right thing to do.

I've recommended the latter in the suggestion I sent in. That way you could leave the projection definitions as is, and any imports using them would work.

The downside of that, of course, is that using a special case version of LCC that cites of Center latitude of 90 (which is bizarre), instead of a perfectly normal 50.79936 and a perfectly normal false northing, is so unusual that if Manifold writes that coordinate system into files that it exports almost certainly you'll have problems with it in some other software. I wouldn't be surprised if the reason those projections were implemented the way they were, years ago, was to avoid that. But hey, better not to second guess and if somebody wants to use those projections, OK, just support them as is and trust people are doing so intentionally.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.