[Qgis-developer] Re: [Qgis-user] Projection of Shapefile export

Micha Silver micha at arava.co.il
Fri Sep 17 06:11:30 EDT 2010


Brett Adams wrote:

> Micha,
> I've attached csv data for importing and all shape files exported. 
> I've added comments into your prior email also.
>
Hi Brett:

I do indeed see a problem exporting to the AGD84 CRS. I get a "Latitude 
or Longitude exceeds limits" error. This happens when the global CRS is 
set to WGS84 (which is the default in QGIS). Attached is a screen shot 
of the error.

Here's how to overcome the problem: Change your Global CRS to AGD84 zone 
51 (BTW, that's EPSG code 20351). This is done in the 
Settings->Options->CRS dialog window. Now re-import the csv file and 
then save as shapefile and you should be able to select the AGD84 CRS 
and have it saved correctly.
Alternatively, if you don't want to change the global CRS setting, you 
can select (in the same Settings->Options-CRS window) to "Prompt for 
CRS".  Then when you import the csv you'll be asked to specify the 
correct CRS for the points, You again select AGD84 and all should be well.

Cheers,
Micha
 
> Brett
>
> On 16/09/2010 9:29 PM, Micha Silver wrote:
>> Hi Brett:
>> (cc-ing the list also)
>>
>> So if I understand correctly:
>> 1- You have coordinate locations in an ascii file which are already 
>> in AGD84 zone 51 CRS : /Yes/
>> 2- You have imported the locations into QGIS using the Delimited Text 
>> plugin :/Yes/
>> 3- You then export to a shapefile. In the export dialog you select 
>> EPSG: 20351 for the CRS, but the resulting shapefile has NO 
>> projection information.(i.e. no *.prj is created?) /No./
> /In the export dialogue I choose UTM - AGD84 / AMG zone 51(Don't know  
> EPSG:20351 )/
>
>
>> 4- You tried to set projection info with the "Vector->Data Management 
>> Tools->Define Current Projection" /Yes, this will run or say 
>> "Identical outout spatial reference system chosen"
>> / 
>
>> 5- Now the new shapefile still does not have CRS ? (i.e. QGIS asks 
>> what CRS when you load the shapefile) : /Not quite. Both prj and qpj 
>> files are created but the DATUM is always "D_unknown" which defaults 
>> to WGS84 when imported into QGIS / Mapinfo. /
>>
>> If I've got the picture right, can you check that NO *.prj or *.qpj 
>> is created on the disk with the other elements of the shapefile?  
>> Would you mind sending me a bit of the ascii file with coord 
>> locations so I can retry?  If this persists, I suggest to report to 
>> Carson Farmer, creator of the fTools plugin. There was a problem in 
>> the past with creating a *.prj file, and I believe it has already 
>> been fixed. If not, he needs to know./ I think this problem is different.
>> /
>> Regards,
>> Micha
>>
>> On 16/09/2010 14:47, Brett Adams wrote:
>>>  Micha,
>>> Updated to 1.5 and have tried defining the current projection as 
>>> suggested but my exports never carry the correct projection. 
>>> Everything goes in as AGD84/zone51 and comes out projection free 
>>> which is then defaults to WGS84. Even tried loading files with the 
>>> AGD84 projection from MAPINFO then exporting, and again they export 
>>> without projection and default to WGS84.
>>>
>>> I'm obviously missing a fairly major step, but is it really that hard?
>>>
>>>
>>>
>>>
>>>
>>> On 16/09/2010 3:09 PM, Micha Silver wrote:
>>>> On 16/09/2010 09:01, Brett Adams wrote:
>>>>> The original file is one created by me via import of delimted text so
>>>>> I'm certain of the projection.
>>>> Question is does QGIS know the projection. If there is no *.prj 
>>>> attached to the shapefile, try to add projection info with the 
>>>> Vector->Data Management->Define Currnet Projection. Then do your 
>>>> export.
>>>>
>>>>> I'll try upgrading to 1.5. See if it makes any difference.
>>>>>
>>>>>
>>>>> 2010/9/16 Micha Silver<micha at arava.co.il>:
>>>>>> On 16/09/2010 03:19, Brett Adams wrote:
>>>>>>> Hi folks,
>>>>>>> When I export a layer as a shapfile the projection is always WGS84,
>>>>>>> even though I specify AGD84 on export.
>>>>>>>
>>>>>>> Am I doing something wrong or is this a bug?
>>>>>>>
>>>>>>>
>>>>>> Are you sure the original shapefile has correct CRS data? That 
>>>>>> is, does it
>>>>>> have a *.prj ?
>>>>>> Also, I'm not 100% sure that exporting to a new CRS was available 
>>>>>> in 1.4.
>>>>>> You might go ahead and upgrade to 1.5 where the feature does work.
>>>>>>> Running Version 1.4.0
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Micha Silver
>>>>>> http://www.surfaces.co.il/
>>>>>> Arava Development Co.  +972-52-3665918
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
> -- 
> Brett Adams
> Spinifex Geophysics
> 0438 861 974
> SKYPE:brettadams_spinifex
>
>
> This mail was received via Mail-SeCure System.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CRS_error.png
Type: image/png
Size: 15837 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20100917/9778bb4f/CRS_error-0001.png


More information about the Qgis-developer mailing list