Ciao Daniele,
I am trying to use Mercator and Albers. If you want to centre Albers
on Europe for example, you can modify d3.geo.js:
d3.geo.albers = function() {
var origin = [10, 50],
parallels = [29.5, 45.5],
scale = 1500,
translate = [480, 250],
That's all you need to change. By the way, if you manage to use
d3.geo.bounds to compute the bounding box of your shape, I'd be very
happy to see your code.
Bixente
On Jun 15, 10:49 pm, daniele galiffa <
daniele.mentegraf...@gmail.com>
wrote:
> Ok,
> everything seems fine now that I edited the geo.js.
>
> This is the editing I did for the mercator projection,
> but maybe most of them are not needed (I'm not GIS expert):
>
> *var d3_radians = Math.PI / 180;
> *
> Is there anyother on the list that already contributed with a proper
> mercator projection?
>
> Thanks,
> d.
>
> On Wed, Jun 15, 2011 at 11:36 PM, daniele galiffa <
>
>
>
>
>
>
>
>
>
>
daniele.mentegraf...@gmail.com> wrote:
> > Ciao Mike,
> > thanks for your replies.
>
> > Actually we figured out that the problem was the exporter.
>
> > So we used GDAL using the following:
>
> > ogr2ogr -f "GeoJSON" myGeoFile.json myGeoFile-polygons-ms1.shp --debug on
>
> > On the other hand we also started from the example,
> > but we are getting errors like:
> > *
> > xy.parallels is not a function*
>
> > We are investigating why :)
>
> > If I don't find nothing,
> > I'll ask to the list...otherwise I'll post the solution here ;)
>
> > Thanks,
> > d.
>