Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-11 Thread Torsten Mohr
Hello Juan,

thank you very very much !!

I just created the first map with the new ShapeFiles boundaries exactly on the
satellite images data.

At the moment i create a second, higher resolution map.


Thanks a lot,
Torsten.


Am Montag, 11. Mai 2009 23:32:14 schrieb Juan Lucas Dominguez Rubio:
> Hi. Your file world_boundaries_m.shp seems to be in the old-fashioned
> EPSG:3395 we discussed a few days ago.
>
> This should produce the shapefile you are looking for
> (world_boundaries_900913.shp):
>
> ogr2ogr -f "ESRI Shapefile" -s_srs epsg:3395 -t_srs "+proj=merc +a=6378137
> +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m
> +nadgri...@null +no_defs +over" world_boundaries_900913.shp
> world_boundaries_m.shp
>
>
>
> regards
> Juan Lucas
>
>
>
> 
>
>
>   Hello,
>
>   thanks for taking a look at it.  The output is ~ 19000 lines, 
> so i'll
> just show the top ~70 lines:
>
>   Had to open data source read-only.
>   INFO: Open of `world_boundaries_m.shp'
> using driver `ESRI Shapefile' successful.
>
>   Layer name: world_boundaries_m
>   Geometry: Polygon
>   Feature Count: 3807
>   Extent: (-20037400.00, -19929239.11) - (20037400.00,
>   18375854.709643)
>   Layer SRS WKT:
>   PROJCS["Mercator",
>   GEOGCS["GCS_WGS_1984",
>   DATUM["WGS_1984",
>   SPHEROID["WGS_1984",6378137,298.257223563]],
>   PRIMEM["Greenwich",0],
>   UNIT["Degree",0.017453292519943295]],
>   PROJECTION["Mercator_1SP"],
>   PARAMETER["latitude_of_origin",0],
>   PARAMETER["central_meridian",0],
>   PARAMETER["scale_factor",1],
>   PARAMETER["false_easting",0],
>   PARAMETER["false_northing",0],
>   UNIT["Meter",1]]
>   CAT: Real (16.0)
>   FIPS_CNTRY: String (80.0)
>   CNTRY_NAME: String (80.0)
>   OGRFeature(world_boundaries_m):0
> CAT (Real) =   15
> FIPS_CNTRY (String) = AY
> CNTRY_NAME (String) = Antarctica
>
>   OGRFeature(world_boundaries_m):1
> CAT (Real) =   15
> FIPS_CNTRY (String) = AY
> CNTRY_NAME (String) = Antarctica
>
>   OGRFeature(world_boundaries_m):2
> CAT (Real) =   15
> FIPS_CNTRY (String) = AY
> CNTRY_NAME (String) = Antarctica
>
>   OGRFeature(world_boundaries_m):3
> CAT (Real) =   15
> FIPS_CNTRY (String) = AY
> CNTRY_NAME (String) = Antarctica
>
>   OGRFeature(world_boundaries_m):4
> CAT (Real) =   15
> FIPS_CNTRY (String) = AY
> CNTRY_NAME (String) = Antarctica
>
>   OGRFeature(world_boundaries_m):5
> CAT (Real) =   15
> FIPS_CNTRY (String) = AY
> CNTRY_NAME (String) = Antarctica
>
>   OGRFeature(world_boundaries_m):6
> CAT (Real) =  174
> FIPS_CNTRY (String) = NZ
> CNTRY_NAME (String) = New Zealand
>
>   OGRFeature(world_boundaries_m):7
> CAT (Real) =  174
> FIPS_CNTRY (String) = NZ
> CNTRY_NAME (String) = New Zealand
>
>   OGRFeature(world_boundaries_m):8
> CAT (Real) =  174
> FIPS_CNTRY (String) = NZ
> CNTRY_NAME (String) = New Zealand
>
>
>   It additionally tells me on stderr:
>   ERROR 4: Unable to open world_boundaries_m.shp or 
> world_boundaries_m.SHP.
>
>
>   Thanks for any hints,
>   Torsten.
>
>   Am Montag, 11. Mai 2009 12:42:44 schrieb Juan Lucas Dominguez 
> Rubio:
>   > Hi:
>   >
>   > I'm curious about that shapefile that needs some stretching. 
> Assuming
>   > its name is filename.shp, try to type this:
>   >
>   > ogrinfo -geom=NO filename.shp filename
>   >
>   > what is the output?
>   >
>   > Regards,
>   > Juan Lucas
>   >
>   >
>   > 
>   >
>   >
>   >
>   >
>   >   Hello Frederik,
>   >
>   >   thanks for your hint. Yes, i know about 
> projections. 
>   > Actually, i reprojected the rester images of "blue marble" 
> from a form

Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-11 Thread Juan Lucas Dominguez Rubio
Hi. Your file world_boundaries_m.shp seems to be in the old-fashioned EPSG:3395 
we discussed a few days ago.

This should produce the shapefile you are looking for 
(world_boundaries_900913.shp):

ogr2ogr -f "ESRI Shapefile" -s_srs epsg:3395 -t_srs "+proj=merc +a=6378137 
+b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m 
+nadgri...@null +no_defs +over" world_boundaries_900913.shp 
world_boundaries_m.shp

 
 
regards
Juan Lucas
 





Hello,

thanks for taking a look at it.  The output is ~ 19000 lines, 
so i'll just
show the top ~70 lines:

Had to open data source read-only.
INFO: Open of `world_boundaries_m.shp'
  using driver `ESRI Shapefile' successful.

Layer name: world_boundaries_m
Geometry: Polygon
Feature Count: 3807
Extent: (-20037400.00, -19929239.11) - (20037400.00,
18375854.709643)
Layer SRS WKT:
PROJCS["Mercator",
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_1984",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Mercator_1SP"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
CAT: Real (16.0)
FIPS_CNTRY: String (80.0)
CNTRY_NAME: String (80.0)
OGRFeature(world_boundaries_m):0
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):1
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):2
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):3
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):4
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):5
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):6
  CAT (Real) =  174
  FIPS_CNTRY (String) = NZ
  CNTRY_NAME (String) = New Zealand

OGRFeature(world_boundaries_m):7
  CAT (Real) =  174
  FIPS_CNTRY (String) = NZ
  CNTRY_NAME (String) = New Zealand

OGRFeature(world_boundaries_m):8
  CAT (Real) =  174
  FIPS_CNTRY (String) = NZ
  CNTRY_NAME (String) = New Zealand


It additionally tells me on stderr:
ERROR 4: Unable to open world_boundaries_m.shp or 
world_boundaries_m.SHP.


Thanks for any hints,
Torsten.


Am Montag, 11. Mai 2009 12:42:44 schrieb Juan Lucas Dominguez 
Rubio:
> Hi:
>
> I'm curious about that shapefile that needs some stretching. 
Assuming its
> name is filename.shp, try to type this:
>
> ogrinfo -geom=NO filename.shp filename
>
> what is the output?
>
> Regards,
> Juan Lucas
>
>
> 
>
>
>
>
>   Hello Frederik,
>
>   thanks for your hint. Yes, i know about 
projections.  Actually, i
> reprojected the rester images of "blue marble" from a form of 
WGS84 to
> Mercaator with an own program.

Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-11 Thread Torsten Mohr
Hello,

thanks for taking a look at it.  The output is ~ 19000 lines, so i'll just
show the top ~70 lines:

Had to open data source read-only.
INFO: Open of `world_boundaries_m.shp'
  using driver `ESRI Shapefile' successful.

Layer name: world_boundaries_m
Geometry: Polygon
Feature Count: 3807
Extent: (-20037400.00, -19929239.11) - (20037400.00, 
18375854.709643)
Layer SRS WKT:
PROJCS["Mercator",
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_1984",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Mercator_1SP"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",0],
PARAMETER["scale_factor",1],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
CAT: Real (16.0)
FIPS_CNTRY: String (80.0)
CNTRY_NAME: String (80.0)
OGRFeature(world_boundaries_m):0
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):1
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):2
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):3
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):4
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):5
  CAT (Real) =   15
  FIPS_CNTRY (String) = AY
  CNTRY_NAME (String) = Antarctica

OGRFeature(world_boundaries_m):6
  CAT (Real) =  174
  FIPS_CNTRY (String) = NZ
  CNTRY_NAME (String) = New Zealand

OGRFeature(world_boundaries_m):7
  CAT (Real) =  174
  FIPS_CNTRY (String) = NZ
  CNTRY_NAME (String) = New Zealand

OGRFeature(world_boundaries_m):8
  CAT (Real) =  174
  FIPS_CNTRY (String) = NZ
  CNTRY_NAME (String) = New Zealand


It additionally tells me on stderr:
ERROR 4: Unable to open world_boundaries_m.shp or world_boundaries_m.SHP.


Thanks for any hints,
Torsten.


Am Montag, 11. Mai 2009 12:42:44 schrieb Juan Lucas Dominguez Rubio:
> Hi:
>
> I'm curious about that shapefile that needs some stretching. Assuming its
> name is filename.shp, try to type this:
>
> ogrinfo -geom=NO filename.shp filename
>
> what is the output?
>
> Regards,
> Juan Lucas
>
>
> 
>
>
>
>
>   Hello Frederik,
>
>   thanks for your hint. Yes, i know about projections.  Actually, 
> i
> reprojected the rester images of "blue marble" from a form of WGS84 to
> Mercaator with an own program.
>
>   But as i've heard it, world_boundaries_m is "defect".  But as 
> an overlay
>   to represent the boundaries it would be ok.  If that 
> information was a
>   misunderstanding and could be fixed with the right projection 
> that would
> be awesome.
>
>   If i use shoreline_300 instead, the projection is perfectly 
> fine, but if
> you try to render it _not_filled_ with a LineSymbolizer instead of a
> PolygonSymbolizer, you get some disturbing "plates".  But the projection is
> fine.
>
>   A ShapeFile contains the "source SRS" inside it, right?  When 
> rendering
>   world_boundaries_m and shoreline_300 i used the same "target 
> SRS".
>   But the result leads to different positions on the final map.
>
>   Does that mean that world_boundaries_m is defect?
>
>   Is there a way to "fix" it somehow?  Or would scaling be 
> possible?
>
>
>   Best regards,
>   Torsten.
>
>   > Hi,
>   >
>   > Torsten Mohr wrote:
>   > > I have a ShapeFile that seems to be incorrect, scaling it in
>   > > Y-direction could make it fit the background.
>   >
>   > Do you have a basic understanding of coordinate projections? 
> If not,
>   > you'd be well advised to spend a few hours reading on the 
> subject
>   > (start with Wikipedia, take it from there).
>   >
>   > You need to find out which projection your shapefile is in, 
> and then
>   > set the correct one in your map file, and things are likely 
> to work.
>   > Simply stretching the data from the shapefile is very 
> unlikely to yield
>   > the desired results - you will probably find that the stretch 
> factor
>   > that makes Iceland and the Equator fit will still have France 
> out of
>   > place.
>   >
>   > Bye
>   > Frederik
>
>   ___
>   talk mailing list
>   talk@openstreetmap.org
>   http://lists.openst

Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-11 Thread Juan Lucas Dominguez Rubio
Hi:

I'm curious about that shapefile that needs some stretching. Assuming its name 
is filename.shp, try to type this:

ogrinfo -geom=NO filename.shp filename

what is the output?

Regards,
Juan Lucas







Hello Frederik,

thanks for your hint. Yes, i know about projections.  Actually, 
i reprojected
the rester images of "blue marble" from a form of WGS84 to 
Mercaator
with an own program.

But as i've heard it, world_boundaries_m is "defect".  But as 
an overlay
to represent the boundaries it would be ok.  If that 
information was a
misunderstanding and could be fixed with the right projection 
that would be
awesome.

If i use shoreline_300 instead, the projection is perfectly 
fine, but if you
try to render it _not_filled_ with a LineSymbolizer instead of a
PolygonSymbolizer, you get some disturbing "plates".  But the 
projection
is fine.

A ShapeFile contains the "source SRS" inside it, right?  When 
rendering
world_boundaries_m and shoreline_300 i used the same "target 
SRS".
But the result leads to different positions on the final map.

Does that mean that world_boundaries_m is defect?

Is there a way to "fix" it somehow?  Or would scaling be 
possible?


Best regards,
Torsten.


> Hi,
>
> Torsten Mohr wrote:
> > I have a ShapeFile that seems to be incorrect, scaling it 
in Y-direction
> > could make it fit the background.
>
> Do you have a basic understanding of coordinate projections? 
If not,
> you'd be well advised to spend a few hours reading on the 
subject (start
> with Wikipedia, take it from there).
>
> You need to find out which projection your shapefile is in, 
and then set
> the correct one in your map file, and things are likely to 
work. Simply
> stretching the data from the shapefile is very unlikely to 
yield the
> desired results - you will probably find that the stretch 
factor that
> makes Iceland and the Equator fit will still have France out 
of place.
>
> Bye
> Frederik


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-10 Thread Jukka Rahkonen
Torsten Mohr  s.netic.de> writes:

> 
> A ShapeFile contains the "source SRS" inside it, right?  When rendering
> world_boundaries_m and shoreline_300 i used the same "target SRS".
> But the result leads to different positions on the final map.

Not necessarily.  Shapefile is a collection of files with three compulsory
parts: .shp, .shx and .dbf.  Projection can be given with a .prj file but that
is optional and very often it is missing.  In that case the user just needs to
know or guess the correct projection.  If data are not to be reprojected or used
together with other data having different projection it is not necessary to know
the projection, but coordinates can just be taken as numbers as they are. That's
why .prj file is so often missing.  For data providers it would be an absolutely
good habbit to include .prj file always to all the shapefiles which are shipped
away.

-Jukka Rahkonen-


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-10 Thread Torsten Mohr
Hello Frederik,

thanks for your hint. Yes, i know about projections.  Actually, i reprojected
the rester images of "blue marble" from a form of WGS84 to Mercaator
with an own program.

But as i've heard it, world_boundaries_m is "defect".  But as an overlay
to represent the boundaries it would be ok.  If that information was a
misunderstanding and could be fixed with the right projection that would be
awesome.

If i use shoreline_300 instead, the projection is perfectly fine, but if you
try to render it _not_filled_ with a LineSymbolizer instead of a
PolygonSymbolizer, you get some disturbing "plates".  But the projection
is fine.

A ShapeFile contains the "source SRS" inside it, right?  When rendering
world_boundaries_m and shoreline_300 i used the same "target SRS".
But the result leads to different positions on the final map.

Does that mean that world_boundaries_m is defect?

Is there a way to "fix" it somehow?  Or would scaling be possible?


Best regards,
Torsten.


> Hi,
>
> Torsten Mohr wrote:
> > I have a ShapeFile that seems to be incorrect, scaling it in Y-direction
> > could make it fit the background.
>
> Do you have a basic understanding of coordinate projections? If not,
> you'd be well advised to spend a few hours reading on the subject (start
> with Wikipedia, take it from there).
>
> You need to find out which projection your shapefile is in, and then set
> the correct one in your map file, and things are likely to work. Simply
> stretching the data from the shapefile is very unlikely to yield the
> desired results - you will probably find that the stretch factor that
> makes Iceland and the Equator fit will still have France out of place.
>
> Bye
> Frederik


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] "scale" a ShapeFile in Y-direction?

2009-05-10 Thread Frederik Ramm
Hi,

Torsten Mohr wrote:
> I have a ShapeFile that seems to be incorrect, scaling it in Y-direction
> could make it fit the background.

Do you have a basic understanding of coordinate projections? If not, 
you'd be well advised to spend a few hours reading on the subject (start 
with Wikipedia, take it from there).

You need to find out which projection your shapefile is in, and then set 
the correct one in your map file, and things are likely to work. Simply 
stretching the data from the shapefile is very unlikely to yield the 
desired results - you will probably find that the stretch factor that 
makes Iceland and the Equator fit will still have France out of place.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk