Commit 3f39eec61227370913a7e7b9b37e2b4f654666b1

Authored by Edmar Moretti
1 parent 2347fea5

#258

classesphp/classe_shp.php
... ... @@ -410,12 +410,24 @@ $para - linha|poligono
410 410 $reg = array();
411 411 $novoshpf = ms_newShapefileObj($nomeshp.".shp", $tipol);
412 412 $this->layer->open();
413   - $this->layer->whichShapes($this->mapa->extent);
  413 +
  414 + $prjMapa = $this->mapa->getProjection();
  415 + $prjTema = $this->layer->getProjection();
  416 + $ret = $this->mapa->extent;
  417 + if (($prjTema != "") && ($prjMapa != $prjTema))
  418 + {
  419 + $projOutObj = ms_newprojectionobj($prjTema);
  420 + $projInObj = ms_newprojectionobj($prjMapa);
  421 + $ret->project($projInObj, $projOutObj);
  422 + }
  423 + $this->layer->whichShapes($ret);
414 424 $linha = ms_newLineObj();
415 425 while ($shape = $this->layer->nextShape())
416 426 {
417 427 $lin = $shape->line(0);
418 428 $pt = $lin->point(0);
  429 + if (($prjTema != "") && ($prjMapa != $prjTema))
  430 + {$pt->project($projInObj, $projOutObj);
419 431 $linha->add($pt);
420 432 }
421 433 if ($para == "poligono")
... ...
imagens/gisicons/google-map.png 0 → 100644

915 Bytes

imagens/gisicons/identify.png 0 → 100644

1010 Bytes

imagens/gisicons/map-extent-info.png 0 → 100644

687 Bytes

imagens/gisicons/search.png 0 → 100644

746 Bytes

imagens/gisicons/zoom-point.png 0 → 100644

1.04 KB