ThinkGeo.com    |     Documentation    |     Premium Support

Specific projection sample

Dear support,

I do have an unsupported projection to take onboard and I have the mathematic formula to implement it.

I’m a bit lost to implement it, because I don’t know where to put my code. I suppose that I’ve to subclass a projectioncore somewhere.

could you provide me a sample ?
or tell me where to find it if any ?

thank you
Patrick.

Hi Patrick,

For projection, if you don’t know it’s epsg id, I think you also can find the projection string like: “+Proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs”.

Our ManagedProj4Projection also support the prj string or proj4 string, so I am not sure your problem here.

And you can find more detail information about your projection on some online website like epsg.io

Regards,

Don

Don,

here are some clarification. Proj4 is not precise enough for French projection, because we need a shiftgrid that does not seems to be implemented.

for EPSG:27573, the provided projection string is
+proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.999877499 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris

where it should be
+proj=lcc +nadgrids=ntf_r93.gsb,null +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs

Proj4 does not support that parameter +nadgrids=ntf_r93.gsb

so the question is: How do I provide my own logic for this particular projection ?

Thank you for your help
Patrick.

Hi Patrick,

Because our projection is implemented by Proj4, so if you have your own logic for reprojection, you should want to build a totally new class to reprojection point, reprojection other shape is reprojection each vertex of them.

One solution is inherit from Projection class and try to implement function like ConvertToExternalProjectionCore, follow this way you need do more test to make sure everything goes well, or some other function need be override also.

The other solution is you directly use your class for reprojection feature, if you want to make that works for layer, you can override some function like Drawcore or GetFeaturesInsideBoundingBoxCore for layer, then you can reprojection the features there.

Wish that’s helpful.

Regards,

Don