Geo-E00

 view release on metacpan or  search on metacpan

lib/Geo/E00.pm  view on Meta::CPAN

				$el[$nr++] = $item;
			}
			my $dline;	
			foreach $dline (@{$aat->{data}}) { 
				$nr = $rarc->{$dline->{$el[5]}};
				$data->{'arc'}->[$nr]->{$el[4]} =  $dline->{$el[4]};
				for (my $i = 7; $i <$aat->{items}; $i++) {
					$data->{'arc'}->[$nr]->{$el[$i]} =  $dline->{$el[$i]};
				}
			}
			
		}
#___________________________________________________
# PAT Part
#___________________________________________________
		if (defined($data->{'ifo'}->{'PAT'})) {
			my $pat = $data->{'ifo'}->{'PAT'};
			my (@el,$item,$nr);
		# the next PAT field will be saved in the LAB structure
		# 0 AREA             
		# 1 PERIMETER       
		# 2 PPPOINT#       
		# 3 PPPOINT-ID    
		# 4 ..
			$nr=0;
			foreach $item (@{$pat->{item}}) { 
				$el[$nr++] = $item;
			}
			my $dline;	
			foreach $dline (@{$pat->{data}}) { 

				$nr = $rlab->{$dline->{$el[2]}};
				for (my $i = 4; $i <$pat->{items}; $i++) {
					$data->{'lab'}->[$nr]->{$el[$i]} =  $dline->{$el[$i]};
				}
			}
		}
	}
	$data;
}

1;

__END__

=head1 NAME

Geo::E00 - Perl extension for reading Esri-E00 formats

=head1 SYNOPSIS


  use Geo::E00;

  $e00 = new Geo::E00;

  $e00->open($file);

  $e00data = $e00->parse();

  $arcdata = $e00data->{arc};

  print "Arcpoint";
  foreach $arc (@$arcdata) {
	print $arc->{npoints},"\n";
  }

=head1 STRUCTURES

=over 4

=item	ARC

			$arc = {
				'cov-num'	=> SCALAR,
				'cov-id'	=> SCALAR,
				'node-from'	=> SCALAR,
				'node-to'	=> SCALAR,
				'poly-left'	=> SCALAR,
				'poly-right'	=> SCALAR,
				'npoints'	=> SCALAR,
				'points'	=> ARRAY,
				'LENGTH'	=> SCALAR,	<- From AAT
				....		=> SCALAR,	<- From AAT
			# containing x,y pairs
				'coord'	=> ARRAY,
			# pointing to 
					->{x} and ->{y}
			};

=item	CNT

			my $cnt = {
				'cnt-id'	=> SCALAR,
				'x'		=> SCALAR,
				'y'		=> SCALAR,
			}

=item	LAB

			my $lab = {
				'cov-id'	=> SCALAR,
				'poly-id'	=> SCALAR,
				'x'		=> SCALAR,
				'y'		=> SCALAR,
			};

=item	LOG

		 $log = {
			'year'		=> SCALAR,
			'month'		=> SCALAR,
			'day'		=> SCALAR,
			'hour'		=> SCALAR,
			'minute'	=> SCALAR,
			'connecttime'	=> SCALAR,
			'cputime'	=> SCALAR,
			'iotime'	=> SCALAR,
			'commandline'	=> SCALAR,
		};

=item	PAL

			my $pal = {

lib/Geo/E00.pm  view on Meta::CPAN

	-	.TIC

=head2	.AAT

The .AAT (Arc Attribute Table) contains seven fields whose item names are self-explanatory.  However, additional items may be added as desired, after the -ID item.

=head2 .ACODE

The .ACODE (Arc Lookup Table) contains seven fields whose item names are the same (except the -ID) as that in the ADS files documentation.  However, additional items should be able to be be added as desired, after the LABEL item.

=head2	.BND

The .BND (Coverage Min/Max Coordinates) table contains four fields whose item names are self-explanatory.

=head2 .PAT

The .PAT (Polygon or Point Attribute Table) contains four fields whose item names are self-explanatory.  However, additional items may be added as desired, after the -ID item.

=head2	.PCODE

The .PCODE (Polygon Lookup Table) contains eight fields whose item names are the same (except the -ID) as that in the ADS files documentation.  However, additional items should be able to be be added as desired, after the LABEL item.

=head2	.TIC

The .TIC (Tic Coordinates) table contains three fields whose item names are self-explanatory.


=head1	CONCLUSION

The content and format of the ARC EXPORT file seems to be straightforward in most cases.  The remaining areas of uncertainty include:

	-	confirmation of the meaning of the second field in the identification line for INFO files ('XX' or '  ')

	-	the meaning of the 'SIN 2' section

	-	the precise format of the PRJ file for different projections

	-	possible variation in the '-1' suffixes of INFO definitions

	-	INFO codes for item types other than character, integer, and real.

However, none of these appears to be that serious, and the indicated formats should be used to identify any errors or limitations.

Because this information was derived from limited experimentation, it should be considered as tentative and subject to revision at any time.

=head1 CAUTION

Note:  ESRI considers the export/import file format to be proprietary.  As a consequence, the identified format can only constitute a "best guess" and must always be considered as tentative and subject to revision, as more is learned.

=head1 EXAMPLES

   use Geo::E00;

   $file = shift;

   $io = new Geo::E00;

   $io->open($file);

   $e00data = $io->parse();
   $arcdata = $e00data->{arc};
   $cntdata = $e00data->{cnt};

   print "Arcpoint";
   foreach $arc (@$arcdata) {
	print $arc->{npoints},"\n";
	print $arc->{LENGTH},"\n";
   }

   print "Arcpoint longitude (x) - latitude (y)";
   foreach $arc (@$arcdata) {
	foreach $ll (@{$arc->{coord}}) {
		print "Longitude $ll->{x}\n";
		print "Latitude  $ll->{y}\n";
	}
   }

=head1 TODO

Suggestions are welcome. ;)

=head1 HISTORY

=over

=item 0.01 2002/10/24 initial release.

=item 0.02 2002/10/30 Added support for LAB section

=item 0.03 2003/05/01 Added support for PAL, IFO, PRJ, log section, + documentation

=item 0.04 2003/05/24 Bugs removed for negative x-y pairs and PAL section

=item 0.05 2003/05/25 Some minor style changes and fixes

=back

=head1 AUTHORS

 Alessandro Zummo <azummo dash e00perl at towertech dot it>
 Bert Tijhuis <B dot Tijhuis at inter dot nl dot net>

=head1 SEE ALSO

 Geo::E00 is released under the GPL end its development
 is funded by Tower Technologies (http://www.towertech.it). 

=head1 COPYRIGHT AND LICENCE


 Copyright (C) 2002-2003 Tower Technologies s.r.l. 
 Copyright (C) 2002-2003 Alessandro Zummo
 Copyright (C) 2003 Bert Tijhuis

 This package is free software and is provided "as is"
 without express or implied warranty. It may be used, modified,
 and redistributed under the same terms as Perl itself.

=cut



( run in 0.731 second using v1.01-cache-2.11-cpan-6aa56a78535 )