1

Re: Spatial reference conversion from a grid ref to eastings/northings

Hello,

In an XML report I have created an SQL that takes the OS grid ref and converts it to eastings + northings. I need to do this as it gets fed into some mapping software I have. I have to chop up the OS grid ref. multiply by 10 and add 50000 for Eastings and 10000 for Northings. I was wondering if there is any built in function to Recorder 6 that will do this sort of conversion? Other than that I guess I could create my own function as it would be tidier if it was outside of the SQL code.

Cheers for now

Gary

2

Re: Spatial reference conversion from a grid ref to eastings/northings

Gary

The function is already there for use in XML reporte etc.  [dbo].[LCReturnEastingsV2] and [dbo].[LCReturnNothingsV2].

Mike

Mike Weideli

3 (edited by MikeWeideli 22-11-2010 18:11:47)

Re: Spatial reference conversion from a grid ref to eastings/northings

Gary
To explain a bit further. The syntax is as follows.

Select [dbo].[LCReturnEastingsV2] (S.Spatial_ref, S.Spatial_ref_system,0 ) as Easting, [dbo].[LCReturnNothingsV2] (S.Spatial_ref, S.Spatial_ref_system,0 ) as Northings FROM  Sample S

This will return the SW corner. If you want the centre of the square then change the 0 to a  1

There is information about this and  your previous  query in the XML reports help system which is available at www.Lfield.co.uk/downloads/r6XMLHelp.zip.


Mike

Mike Weideli

4

Re: Spatial reference conversion from a grid ref to eastings/northings

Thanks Mike, those functions are exactly what I was looking for. I think that I need to take a step back and look through the xml manual. As it seems to have a lot of things in there I would like to use.

Cheers for now

Gary Pocklington

5

Re: Spatial reference conversion from a grid ref to eastings/northings

Are these functions going to be made available via the Report Wizard? For GIS, Eastings and Northings (OSGB) are far more appropriate than Lat/Long - well, they are in my case.

Les Evans-Hill
Senior Data Officer, National Moth Recording Scheme

6

Re: Spatial reference conversion from a grid ref to eastings/northings

This has been added to the list of suggested enhancements.

Mike Weideli

7

Re: Spatial reference conversion from a grid ref to eastings/northings

Adding fields to the report wizard isn't that hard, and I think it is documented somewhere (there was a document on the R6 website last time I looked a year or so ago).

To any user who wants to have additional fields available in the report wizard, I urge you to locate and read the documentation and do it yourself. There are enough bugs and glitches in Recorder which need resources to fix without diverting them to something which we can do ourselves.

Rob Large
Wildlife Sites Officer
Wiltshire & Swindon Biological Records Centre

8 (edited by MikeWeideli 14-12-2010 20:12:00)

Re: Spatial reference conversion from a grid ref to eastings/northings

Rob

Many thanks for the comment. Resources for improving Recorder are limited, so anything users can do for themselves and others  will help. I can't track down the documentation at the moment for adding fields to the Wizard. I had the feeling that it might have covered the previous appoach  and not the current system, but I am not sure about this.  Certainly if anyone wants to have a go I will try to help if needed.

I did have a go at this one though http://forums.nbn.org.uk/viewtopic.php?id=1936

The important thing is that anyone trying it should  give feedback so that if it works then it can be added as system supplied to the next release.

Mike Weideli

9 (edited by sallyrankin 15-12-2010 08:27:27)

Re: Spatial reference conversion from a grid ref to eastings/northings

Is the documentation you are referring to http://forums.nbn.org.uk/wiki/index.php?title=Report_Attributes ? It isn’t comprehensive enough and it is probably out of date but it helps. The Wiki contains a few useful things like this, http://forums.nbn.org.uk/wiki/index.php?title=Using_the_Reporting_Snapshot_Tool_to_link_Recorder_6_to_MapInfo , http://forums.nbn.org.uk/wiki/index.php?title=Preparing_a_custom_Recorder_CD and http://forums.nbn.org.uk/wiki/index.php?title=Custom_XML_Report_Writing_Tutorial . The latter and the information in the Recorder 6 Help provide useful introductions to writing XML reports but for more detail see Mike’s help at www.Lfield.co.uk/downloads/r6XMLHelp.zip . It is a shame resources haven’t enabled the Wiki to be made more useful.

Sally Rankin, JNCC Recorder Approved Expert
E-mail: s.rankin@btinternet.com
Telephone: 01491 578633
Mobile: 07941 207687